private void OnDestroy() { if (_stateMachine != null) { _stateMachine.UnInit(); _stateMachine = null; } }
private void Awake() { _stateMachine = new CommonStateMachine(); _stateMachine.Init(); if (motionAttribute == null) { motionAttribute = this.GetComponent <PlayerMotionAttribute>(); } }