private void Update() { if (mPrevState != mActiveState) { if (mPrevState != null) { // for some reason, these states base variables don't persist... mActiveState.mInRangeOfPlayer = mPrevState.mInRangeOfPlayer; mPrevState.Exit(); } mActiveState.Enter(mCharController); } // debug if (Input.GetKeyDown(KeyCode.C)) { YEO_CLOTHES_SUS_EVENT susEvent = new YEO_CLOTHES_SUS_EVENT(); susEvent.iSuspicion = 5; EventManager.Instance.FireEvent(susEvent); } mPrevState = mActiveState; mActiveState = mActiveState.LocalUpdate(); }
public void AddSuspicion(YEO_CLOTHES_SUS_EVENT eventData) { AddSuspicion(eventData.iSuspicion); }