Beispiel #1
0
    void Update()
    {
        if (brain == null)
        {
            Debug.LogWarning("No brain assigned to " + gameObject.name);
            return;
        }

        brain.Think(this);
    }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (currentBrain)
     {
         currentBrain.Think(this);
     }
     if (Input.GetKeyDown(KeyCode.P))
     {
         SwitchBrain(pawnBrain);
     }
     if (Input.GetKeyDown(KeyCode.S))
     {
         SwitchBrain(strangerBrain);
     }
 }