private string getStateString(PineappleState state) { string name = "UNKNOWN"; switch (state) { case PineappleState.HIDDEN: name = "Hidden"; break; case PineappleState.APPEARING: name = "Appearing"; break; case PineappleState.APPEARED: name = "Appeared"; break; case PineappleState.SPAWNING_ENEMY: name = "Spawning_Enemy"; break; case PineappleState.HIDING: name = "Hiding"; break; case PineappleState.SELECTING_BEHAVIOUR: name = "Selecting behaviour"; break; } return(name); }
private void ChangeState(PineappleState state) { if (debugState) { Debug.Log("Pineapple State: Changing from " + getStateString(currentState) + " to " + getStateString(state)); } currentState = state; }