public void SetState(ConsciousnessController.ConsciousnessState state) { if (this.m_State == state) { return; } this.m_State = state; this.m_EnterStateTime = Time.time; }
private void UpdateState() { ConsciousnessController.ConsciousnessState state = this.m_State; if (state != ConsciousnessController.ConsciousnessState.PassingOut) { if (state != ConsciousnessController.ConsciousnessState.PassedOut) { return; } this.UpdatePassedOut(); } else { float b = Time.time - this.m_EnterStateTime; this.m_PassingOutProgress = CJTools.Math.GetProportionalClamp(0f, 1f, b, 0f, this.m_PassingOutDuration); if (this.m_PassingOutProgress == 1f) { this.PassOut(); return; } } }
public bool IsState(ConsciousnessController.ConsciousnessState state) { return(this.m_State == state); }