Example #1
0
        private Transform target; // ロックオン対象

        #endregion Fields

        #region Constructors

        /// <summary>
        /// プレイヤーカメラの動作
        /// </summary>
        /// <param name="controller">カメラを制御するためのクラス</param>
        /// <param name="horizontalRotationSpeed">プレイヤーがカメラを操作するときの水平方向移動速度</param>
        /// <param name="verticalRotationSpeed">プレイヤーがカメラを操作するときの垂直方向移動速度</param>
        public PlayerCamera(CameraController controller, float horizontalRotationSpeed, float verticalRotationSpeed)
        {
            this.controller = controller;
            cameraTransform = controller.cameraTransform;
            this.horizontalRotationSpeed = horizontalRotationSpeed;
            this.verticalRotationSpeed = verticalRotationSpeed;
            player = GameManager.instance.player;
        }
Example #2
0
 public AttackState(Player player)
     : base(player)
 {
     player.attackFlow.OnActionChanged += new Action(OnActionChanged);
 }
Example #3
0
 public BaseState(Player player)
 {
     this.player = player;
 }
Example #4
0
            private float speed; // 速度

            #endregion Fields

            #region Constructors

            public AirDashState(Player player)
                : base(player)
            {
                speed = initialVelocity;
                player.jumpVY = 0.0f;
                player.isAirDashPossible = false;
            }
Example #5
0
            private float trampledJumpInputCount; // 踏みつけジャンプ入力受付カウンタ

            #endregion Fields

            #region Constructors

            public AirState(Player player)
                : base(player)
            {
                player.attackFlow.ChangeMode(PlayerAttackFlow.Mode.Air);
            }
Example #6
0
 public NormalState(Player player)
     : base(player)
 {
     // 接地しているのでジャンプ状態を解除
     player.currentJumpState = JumpState.None;
     player.jumpVY = 0.0f;
     player.animator.SetBool(player.isGroundedID, true);
     player.isAirDashPossible = false;
     player.attackFlow.ChangeMode(PlayerAttackFlow.Mode.Ground);
 }
Example #7
0
 public WallKick(Player player)
     : base(player)
 {
     speed = primarySpeed;
     player.isAirDashPossible = true;
     player.animator.SetBool(player.isTrampledID, true);
 }
Example #8
0
            private float transitionCount; // 次の状態へ遷移するまでの時間をカウント

            #endregion Fields

            #region Constructors

            public DepressionState(Player player)
                : base(player)
            {
                player.animator.SetTrigger(player.isJumpID);
            }
Example #9
0
 public DashToTargetState(Player player, Vector3 position)
     : base(player)
 {
     target = position;
 }
Example #10
0
 public DamageState(Player player)
     : base(player)
 {
     damegeSeconds = player.animator.GetCurrentAnimatorStateInfo(0).length;
     player.StartCoroutine(MoveCoroutine());
     player.jumpVY = 0.0f;
 }
Example #11
0
 public DashToTargetState(Player player)
     : base(player)
 {
     target = player.lockOnTarget.transform;
 }
Example #12
0
 public AttackState(Player player)
     : base(player)
 {
 }