public override void OnCardboardTrigger() { Log.Info(Tag, "onCardboardTrigger"); // Always give user feedback vibrator.Vibrate(50); // Display toast if (game.IsLookingAtObject) { var message = string.Format("thing has been found {0} times", ++this.findCounter); overlayView = FindViewById <CardboardOverlayView> (Resource.Id.overlay); overlayView.Show3DToast(message); } }
protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView (Resource.Layout.common_ui); CardboardView cardboardView = FindViewById<CardboardView> (Resource.Id.cardboard_view); cardboardView.SetRenderer (this); CardboardView = cardboardView; vibrator = (Vibrator)GetSystemService (Context.VibratorService); overlayView = FindViewById<CardboardOverlayView> (Resource.Id.overlay); overlayView.Show3DToast ("Pull the magnet\nwhen you find an object."); headView = new float[16]; game = new Game (this, headView); VolumeKeysMode = VolumeKeys.DisabledWhileInCardboard; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.common_ui); CardboardView cardboardView = FindViewById <CardboardView> (Resource.Id.cardboard_view); cardboardView.SetRenderer(this); CardboardView = cardboardView; vibrator = (Vibrator)GetSystemService(Context.VibratorService); overlayView = FindViewById <CardboardOverlayView> (Resource.Id.overlay); overlayView.Show3DToast("Pull the magnet\nwhen you find an object."); headView = new float[16]; game = new Game(this, headView); VolumeKeysMode = VolumeKeys.DisabledWhileInCardboard; }