Ejemplo n.º 1
0
 public void CheckState()
 {
     stateTracker = GameObject.FindGameObjectWithTag("Player").GetComponent <GamestateTracker>();
     if (stateTracker != null)
     {
         stateTracker.Updatestep();
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space) && button.activeSelf)
        {
            foreach (int i in triggerSteps)
            {
                if (i == gamestate.Gamestep)
                {
                    gamestate.Gamestep++;
                    gamestate.Updatestep();
                    print(gamestate.Gamestep);
                    //print(Items.itemName);

                    break;
                }
            }
        }
    }