protected virtual void OnPuppeteerDeactivate() { puppetState = PuppetStates.Inactive; SetAnimatorControllerActive(false); onPuppeteerDeactivate.SafeInvoke(); }
protected virtual void OnPuppeteerActivate() { // Wait to set active on next frame, so we don't take in the input for the current frame // (e.g. the input for switching to Puppeteer mode) and call PlayerStickerEffect() on same frame. StartCoroutine(WaitNextFrameSwitchState()); IEnumerator WaitNextFrameSwitchState() { yield return(null); puppetState = PuppetStates.Active; SetAnimatorControllerActive(true); onPuppeteerActivate.SafeInvoke(); } }
protected override void Awake() { base.Awake(); puppetState = PuppetStates.Inactive; }