mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-30 23:16:09 +00:00 
			
		
		
		
	Shaker
This commit is contained in:
		
							parent
							
								
									d0a7f9a504
								
							
						
					
					
						commit
						c5c8afdd4b
					
				
					 1 changed files with 12 additions and 1 deletions
				
			
		|  | @ -6,7 +6,7 @@ using System.Diagnostics; | ||||||
| using System.Linq; | using System.Linq; | ||||||
| using System.Text; | using System.Text; | ||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| 
 | using Xamarin.Essentials; | ||||||
| using Xamarin.Forms; | using Xamarin.Forms; | ||||||
| using Xamarin.Forms.Xaml; | using Xamarin.Forms.Xaml; | ||||||
| 
 | 
 | ||||||
|  | @ -26,6 +26,17 @@ namespace AideDeJeu.Views.PlayerCharacter | ||||||
| 
 | 
 | ||||||
|             InitializeComponent(); |             InitializeComponent(); | ||||||
| 
 | 
 | ||||||
|  |             if (!Accelerometer.IsMonitoring) | ||||||
|  |             { | ||||||
|  |                 Accelerometer.ShakeDetected += Accelerometer_ShakeDetected; | ||||||
|  |                 Accelerometer.Start(SensorSpeed.Game); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         private void Accelerometer_ShakeDetected(object sender, EventArgs e) | ||||||
|  |         { | ||||||
|  |             var vm = BindingContext as PlayerCharacterEditorViewModel; | ||||||
|  |             vm.RollDicesMRickCommand.Execute(null); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         //protected override bool OnBackButtonPressed() |         //protected override bool OnBackButtonPressed() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez