public void InitCommonMotion() { PlayerCommonMotionState.NextStateEvent.Subscribe(state => { CommonMotionState = state; }).AddTo(this); if (CurrentCommonMotionState.IsInitialized) { CurrentCommonMotionState.Move(MoveType.Auto); } }
public override void Move(MoveType type) { if (!CanMove()) { return; } if (stopPoint != null) { stopPoint.GetComponent <Stop>().RemoveCharacter(); stopPoint = null; } CurrentCommonMotionState.Move(type); }
// 初期化 protected virtual void Start() { simpleAnim = GetComponent <SimpleAnimation>(); // CapsuleColliderコンポーネントを取得する(カプセル型コリジョン) col = GetComponent <CapsuleCollider>(); //メインカメラを取得する cameraObject = GameObject.FindWithTag("MainCamera"); attackEnable.OnNext(false); deadMotionFlag = false; PlayerCommonMotionState.Initialize(transform, simpleAnim); CurrentCommonMotionState.Move(MoveType.Auto); }