Update() private method

private Update ( ) : void
return void
示例#1
0
 private void Update()
 {
     if (IsPlayerBehaviourSet())
     {
         _currentBehaviour.Update();
     }
 }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        player.Update();

        HandleInput();

        if (inventory.items.Count > 0)
        {
            handsFull = true;
            Food food = (inventory.items[0] as GameObject).GetComponent <FoodUnity>().food;
            UIInterface.UI.SetItemInHandText(food.name);
        }
        else
        {
            handsFull = false;
            UIInterface.UI.SetItemInHandText("");
        }
    }