// Update is called once per frame void Update() { if (prev_state != enemy_behaviour.e_state || prev_dir != enemy_behaviour.e_dir_state) { StateChange(); } prev_state = enemy_behaviour.e_state; prev_dir = enemy_behaviour.e_dir_state; }
public void StateMachine(Enemy_state state) { e_state = state; }