Ejemplo n.º 1
0
 /************************** Input Events ********************************/
 void LeftControllerEvents_TriggerDown(object sender, VRTK.ControllerInteractionEventArgs e)
 {
     LeftAnimator.SetHandGhost(false);
 }
Ejemplo n.º 2
0
    public void ChangeGameMode(GameMode newGameMode)
    {
        if (!CanPerformTransition(CurrentGameMode, newGameMode))
        {
            return;
        }

        // Exit current Game mode
        switch (CurrentGameMode)
        {
        case GameMode.SELECTION:
        {
            World.Instance.ShowShelf(false);
        }
        break;

        case GameMode.DRAW:
        {
            PathTool.Deactivate();
            RightAnimator.MakeHandIdleAndGhost();
        }
        break;

        case GameMode.DELETE:
        {
            RightAnimator.MakeHandIdleAndGhost();
        }
        break;

        case GameMode.COMPLETE:
            World.Instance.LoadCurrentSaveSlot();
            break;
        }

        CurrentGameMode = newGameMode;

        // Enter new Game mode
        switch (CurrentGameMode)
        {
        case GameMode.SELECTION:
        {
            World.Instance.ShowShelf(true);
        }
        break;

        case GameMode.DRAW:
        {
            PathTool.Activate(CreateGadgetAlongPath);
            RightAnimator.MakeHandLaser();
            RightAnimator.SetHandGhost(false);
        }
        break;

        case GameMode.DELETE:
        {
            RightAnimator.MakeHandDelete();
        }
        break;

        case GameMode.COMPLETE:
            RightAnimator.MakeHandIdleAndGhost();
            IEnumerator coroutine = ResetGame();
            StartCoroutine(coroutine);
            break;
        }
    }