// Update is called once per frame void FixedUpdate() { if (life != null) { if (normalBrain != null && !life.getContaminated() && mv != null) { normalBrain.Act(mv); } if (infectedBrain == null && life.getContaminated() && normalBrain != null && mv != null) { normalBrain.Act(mv); } else if (infectedBrain != null && life.getContaminated() && mv != null) { infectedBrain.Act(mv); } } else if (normalBrain != null && mv != null) { normalBrain.Act(mv); } }
protected void Update() { brain.Act(Time.deltaTime); behaviourTree.CalculateAndSetNextState(false); try { state.Tick(Time.deltaTime); } catch (System.NullReferenceException) { Debug.LogWarning("No state asigned for Update in " + gameObject.name, gameObject); } }
public Command Act(GameState gameState) => Brain.Act(this, gameState);
private void DoTurn() { brain.Act(); }