public void ChangeState(IAgentState newState) { if (currentState != null && currentState != newState) { currentState.Exit(); } currentState = newState; currentState.Enter(); }
protected void SetState(IAgentState State) { activeState = State; activeState.Activate(this); // pass the agent that is changing states to the necessary state }
public void changeState(IAgentState aState) { _currentState = aState; }
public AgentV2(IAgentState currentState) { _currentState = currentState; _HP = MAX_HP; }