void Awake() { Debug.Assert(Singleton == null, "StateManager Singleton not null on Awake."); Singleton = this; currentState = new EmotionState(); currentState.PrintState(); }
/// <summary> /// Update current emotion state of person on stage based on new inputs. /// </summary> public void UpdateEmotions(EmotionState emotionChange) { if (currentState == null) { return; } currentState.anger += emotionChange.anger; currentState.sadness += emotionChange.sadness; currentState.joy += emotionChange.joy; currentState.envy += emotionChange.envy; currentState.fear += emotionChange.fear; currentState.PrintState(); UIManager.Singleton.UpdateUI(currentState); mapValue(); }