예제 #1
0
        public void HandleHoverCatButtonClickedEvent(object sender, HoverCatButtonEventArgs buttonArgs)
        {
            switch(this.gameState)
            {   
                case SensorState.DeviceReady:
                    this.MainCamera.GetComponent<PinchToScale>().enablePinchToScale = false;
                    StructureARPlugin.startScanning();//tell StructurePlugin to start scanning
                    this.gameState = SensorState.Scanning;
                    break;
                    
                case SensorState.Scanning:
                    StructureARPlugin.doneScanning();//tell StructurePlugin to finish scanning.
                    this.gameState = SensorState.WaitingForMesh;
                    break;
                    
                case SensorState.WaitingForMesh://ignore buttons.
                    break;
                    
                case SensorState.Playing:

					if (buttonArgs.catButtonEvent == HoverCatButtonEvent.ResetGame)
					{
                        this.MainCamera.GetComponent<PinchToScale>().enablePinchToScale = true;
                        structureObjectLoader.ClearMesh(this.scanObject);
                        StructureARPlugin.resetScanning();//tell StructurePlugin to reset the scanned data.
                        this.gameState = SensorState.DeviceReady;
					}
                    break;
                    
                default:
                    GameLog.Log(this.ToString() + " -- unhandled game state for button" + buttonArgs.catButtonEvent);
                    break;
            }

        }
예제 #2
0
        // Use this for initialization
		protected override void HandleHoverCatButtonEvent(object sender, HoverCatButtonEventArgs args)
        {
			base.HandleHoverCatButtonEvent(sender, args);
            if(args.catButtonEvent == HoverCatButtonEvent.ToggleHoop)
            {
                if(this.gameObject.activeSelf)
                {
                    this.Hide();
                }
                else
                {
                    this.Show();
                }
            }
        }
예제 #3
0
		protected virtual void HandleHoverCatButtonEvent(object sender, HoverCatButtonEventArgs args)
		{
			switch (args.catButtonEvent)
			{
				case HoverCatButtonEvent.ResetObjects:
					this.Freeze();
					this.Home();
					this.Show();
					break;
				case HoverCatButtonEvent.ResetGame:
					this.Freeze();
					this.Home();
					break;
					
			}
		}