Ejemplo n.º 1
0
        public override void OnCardboardTrigger()
        {
            Log.Info(Tag, "onCardboardTrigger");

            if (IsLookingAtObject)
            {
                mScore++;
                mOverlayView.show3DToast("Found it! Look around for another one.\nScore = " + mScore);
                HideObject();
            }
            else
            {
                mOverlayView.show3DToast("Look around to find the object!");
            }
            // Always give user feedback
            mVibrator.Vibrate(50);
        }
Ejemplo n.º 2
0
        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;

            modelCube           = new float[16];
            camera              = new float[16];
            view                = new float[16];
            modelViewProjection = new float[16];
            modelView           = new float[16];
            modelFloor          = new float[16];
            headView            = new float[16];
            mVibrator           = (Vibrator)GetSystemService(Context.VibratorService);

            mOverlayView = FindViewById <CardboardOverlayView> (Resource.Id.overlay);
            mOverlayView.show3DToast("Pull the magnet when you find an object.");
        }