示例#1
0
 public void CheckState()
 {
     stateTracker = GameObject.FindGameObjectWithTag("Player").GetComponent <GamestateTracker>();
     if (stateTracker != null)
     {
         stateTracker.Updatestep();
     }
 }
示例#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;
                }
            }
        }
    }