Exemple #1
0
    public PlayerState(IEventManager playerEvent)
    {
        #region Player State Initialization
        _StateIdle              = new IdleState(this);
        _StateWalk              = new WalkState(this);
        _StateSprint            = new SprintState(this);
        _StateFall              = new FallState(this);
        _StateCrouch            = new CrouchState(this);
        _StateJump              = new JumpState(this);
        _StateCrouchWalk        = new CrouchWalkState(this);
        _StateSlide             = new SlideState(this);
        _StateCrouchJump        = new CrouchJumpState(this);
        _StateCrouchFall        = new CrouchFallState(this);
        _StateAirMoveCrouchFall = new AirMoveCrouchFallState(this);
        _StateAirMoveCrouchJump = new AirMoveCrouchJumpState(this);
        _StateAirMoveFall       = new AirMoveFallState(this);
        _StateAirMoveJump       = new AirMoveJumpState(this);
        #endregion

        _ActiveProxies      = new HashSet <IDynamicProxy>();
        _EventPlayer        = playerEvent;
        _CurrentPlayerState = _StateIdle;

        #region State Proxy Initialization
        _MediatorToggleProxy             = new ToggleProxyMediator();
        _ProxySprint                     = new SprintProxy(this, _MediatorToggleProxy);
        _ProxyCrouch                     = new CrouchProxy(this, _MediatorToggleProxy);
        _MediatorToggleProxy.ProxyCrouch = _ProxyCrouch;
        _MediatorToggleProxy.ProxySprint = _ProxySprint;

        _ProxyWalk = new WalkProxy(this, _MediatorToggleProxy);
        _ProxyFall = new FallProxy(this);
        _ProxyJump = new JumpProxy(this, _MediatorToggleProxy);
        #endregion
    }
    public void ReplaceFallState(FallState newState)
    {
        var index     = GameComponentsLookup.FallState;
        var component = CreateComponent <FallStateComponent>(index);

        component.state = newState;
        ReplaceComponent(index, component);
    }
Exemple #3
0
 ///<summary>
 ///着地
 ///</summary>
 void UpdateLanding()
 {
     //落下中
     if (fallState == FallState.FREEFALL || fallState == FallState.FAST_FALL)
     {
         //下の中身が空では無かったら
         if (!blockController.LandingFieldCheck())
         {
             fallState = FallState.LANDING;
         }
     }
 }
Exemple #4
0
        private void initializeSateMachine()
        {
            idleState   = new IdleState();
            walkState   = new WalkState();
            attackState = new AttackState();
            fallState   = new FallState();

            playerStateMachine = new StateMachine <Player>(this, idleState);
            playerStateMachine.addState(walkState);
            playerStateMachine.addState(attackState);
            playerStateMachine.addState(fallState);
        }
Exemple #5
0
    private void Awake()
    {
        // 获取游戏对象或组件
        var idleToRun  = GetComponent <IdleToRun>();
        var runToIdle  = GetComponent <RunToIdle>();
        var idleToJump = GetComponent <IdleToJump>();
        var jumpToFall = GetComponent <JumpToFall>();
        var runToJump  = GetComponent <RunToJump>();
        var fallToIdle = GetComponent <FallToIdle>();
        var fallToRun  = GetComponent <FallToRun>();
        var runToFall  = GetComponent <RunToFall>();
        var fallToJump = GetComponent <FallToJump>();

        var animator = GetComponent <Animator>();

        _rigidbody2D = GetComponent <Rigidbody2D>();

        // 创建状态机
        _stateMachine = new StateMachine();

        // 获取状态
        var idleState = new IdleState(animator);
        var runState  = new RunState(animator, _rigidbody2D);
        var jumpState = new JumpState(this, animator, _rigidbody2D);
        var fallState = new FallState(this, animator, _rigidbody2D);

        // 添加转换
        At(idleState, runState, () => idleToRun.Predicate());
        At(runState, idleState, () => runToIdle.Predicate());
        At(idleState, jumpState, () => idleToJump.Predicate());
        At(jumpState, fallState, () => jumpToFall.Predicate());
        At(fallState, idleState, () => fallToIdle.Predicate());
        At(runState, jumpState, () => runToJump.Predicate());
        At(fallState, runState, () => fallToRun.Predicate());
        At(runState, fallState, () => runToFall.Predicate());
        At(fallState, jumpState, () => fallToJump.Predicate());

        // 转换状态
        _stateMachine.ChangeState(idleState);

        // 添加转换的方法
        void At(AbstractState from, AbstractState to, Func <bool> condition) => _stateMachine.AddTransition(from, to, condition);
    }
Exemple #6
0
    public override void Place()
    {
        base.Place();

        LevelController = FindObjectOfType <LevelController>();

        _stateMachine = new StateMachine();

        _walkState = new WalkState(this);
        var fallState  = new FallState(this);
        var climbState = new ClimbState(this);
        var dieState   = new DieState(this);

        _stateMachine.AddTransition(_walkState, fallState, () => !OnGround);
        _stateMachine.AddTransition(fallState, _walkState, () => OnGround);
        _stateMachine.AddTransition(_walkState, climbState, () => Climbing);
        _stateMachine.AddTransition(climbState, _walkState, () => !Climbing);

        _stateMachine.AddAnyTransition(dieState, () => _dead);
    }
Exemple #7
0
    void Start()
    {
        position = transform.position;

        MoveState moveState = new MoveState();
        JumpState jumpState = new JumpState();
        FallState fallState = new FallState();

        movementStateMachine = new MovementStateMachine();
        movementStateMachine.inputActionMap = actionMap;
        movementStateMachine.transform      = transform;
        movementStateMachine.motor          = motor;
        movementStateMachine.animator       = animator;
        movementStateMachine.AddState("move", moveState);
        movementStateMachine.AddState("jump", jumpState);
        movementStateMachine.AddState("fall", fallState);
        movementStateMachine.Init(moveState);

        moveDir = Vector3.forward;
    }
Exemple #8
0
    //------------------------------------------------------------------------------------------
    // Update
    //------------------------------------------------------------------------------------------
    private void Update()
    {
        if (currentState == FallState.Stay && this.transform.childCount != 0)
        {
            // 時間経過を見る
            count += Time.deltaTime;
            if (count >= waitCount)
            {
                reStartTime  = Time.time;
                count        = 0.0f;
                currentState = FallState.Down;
            }
        }

        // 時間が経ったら落下開始
        if (currentState == FallState.Down)
        {
            // 現在の位置
            var percentage = ((Time.time - reStartTime) * fallSpeed) / distance;

            this.transform.position = Vector3.Lerp(startPosition, endPosition, percentage);
            if (CheckMove(this.transform.position, endPosition))
            {
                currentState = FallState.Up;
            }
        }

        // 落下後上昇
        if (currentState == FallState.Up)
        {
            // 現在の位置
            var percentage = ((Time.time - reStartTime) * comebackSpeed) / distance;

            this.transform.position = Vector3.Lerp(endPosition, startPosition, percentage);
            if (CheckMove(this.transform.position, startPosition))
            {
                currentState = FallState.Stay;
            }
        }
        Pass();
    }
Exemple #9
0
        private void Awake()
        {
            // 存储两个碰撞检测点的位置
            FrogVariables.LeftX  = leftPoint.position.x;
            FrogVariables.RightX = rightPoint.position.x;
            // 创建状态机
            StateMachine = new StateMachine();
            // 创建所有的状态
            var idleState  = new IdleState(FrogStateID.Idle, this);
            var jumpState  = new JumpState(FrogStateID.Jump, this);
            var fallState  = new FallState(FrogStateID.Fall, this);
            var deathState = new DeathState(FrogStateID.Death, this);

            // 添加状态字典
            StateMachine.AddState(idleState);
            StateMachine.AddState(jumpState);
            StateMachine.AddState(fallState);
            StateMachine.AddState(deathState);
            // 初始化状态机
            StateMachine.Initialize(idleState);
        }
Exemple #10
0
    public void Start()
    {
        var dash             = GetComponent <Dash>();
        var ledgeDetector    = GetComponent <CharacterLedgeDetector>();
        var ledgeGrabAbility = GetComponent <LedgeGrab>();

        playerMovement = GetComponent <PlayerMovement>();
        playerAttack   = GetComponent <PlayerAttack>();

        GroundState    = new GroundState(playerMovement, playerAttack);
        FallState      = new FallState(playerMovement, ledgeDetector, ledgeGrabAbility);
        DashState      = new DashState(playerMovement, dash);
        JumpState      = new JumpState(playerMovement);
        LedgeGrabState = new LedgeGrabState(playerMovement, ledgeGrabAbility);

        //TEST
        AttackState = new AttackState(playerMovement, playerAttack);

        WallJumpState = new WallJumpState(playerMovement);

        currentMovementState = GroundState;
    }
    private void InitializeDictionary()
    {
        ACharacterState instance = new JumpState() as JumpState;

        instance.Initialize(ECharacterState.JUMP, this);
        _characterStates.Add(ECharacterState.JUMP, instance);

        instance = new IdleState() as IdleState;
        instance.Initialize(ECharacterState.IDLE, this);
        _characterStates.Add(ECharacterState.IDLE, instance);

        instance = new WalkState() as WalkState;
        instance.Initialize(ECharacterState.WALK, this);
        _characterStates.Add(ECharacterState.WALK, instance);

        instance = new FallState() as FallState;
        instance.Initialize(ECharacterState.FALL, this);
        _characterStates.Add(ECharacterState.FALL, instance);

        instance = new SteamState() as SteamState;
        instance.Initialize(ECharacterState.STEAM, this);
        _characterStates.Add(ECharacterState.STEAM, instance);
    }
Exemple #12
0
        private void Awake()
        {
            // 创建状态机
            StateMachine = new StateMachine();
            // 创建所有的状态
            var idleState   = new IdleState(StateID.Idle, this);
            var runState    = new RunState(StateID.Run, this);
            var jumpState   = new JumpState(StateID.Jump, this);
            var fallState   = new FallState(StateID.Fall, this);
            var hurtState   = new HurtState(StateID.Hurt, this);
            var crouchState = new CrouchState(StateID.Crouch, this);
            var deathState  = new DeathState(StateID.Death, this);

            // 初始化状态字典
            StateMachine.AddState(idleState);
            StateMachine.AddState(runState);
            StateMachine.AddState(jumpState);
            StateMachine.AddState(fallState);
            StateMachine.AddState(hurtState);
            StateMachine.AddState(crouchState);
            StateMachine.AddState(deathState);
            // 初始化状态机
            StateMachine.Initialize(idleState);
        }
    public void Fall(ref PlayerState playerState)
    {
        switch (this.fallState)
        {
        case FallState.Setup:
            this.fallState = FallState.Falling;
            this.playerAnimator.Play("Falling Down");
            break;

        case FallState.Falling:
            break;

        case FallState.Done:
            playerState    = PlayerState.Default;
            this.fallState = FallState.Setup;
            this.healthComponent.TakeDamage(this.FallDamageAmount);

            //Move player position to respawn point
            this.gameObject.transform.position = this.activeRespawnPoint;

            //Make player sprite blink
            break;
        }
    }
Exemple #14
0
    // Update is called once per frame
    void Update()
    {
        switch (fallState)
        {
            #region 自然落下
        case FallState.FREEFALL:
            //自然落下時間を計測
            freefallTime += UnityEngine.Time.deltaTime;

            //自然落下時間になったら
            if (freefallTime >= FREEFALL_TIME[gameController.stage])
            {
                //自然落下時間をリセット
                freefallTime = 0f;

                //下移動
                gameObject.transform.position -= COL;
                //移動先の中身が空ではなかったら
                if (!blockController.BlockFieldCheck())
                {
                    //上移動で戻す
                    gameObject.transform.position += COL;
                }
            }

            if (Input.GetKey(KeyCode.DownArrow))
            {
                //状態を高速落下に
                fallState = FallState.FAST_FALL;
            }
            break;
            #endregion

            #region 高速落下
        case FallState.FAST_FALL:
            //高速落下
            FastFall();

            break;
            #endregion

            #region 着地
        case FallState.LANDING:
            //配列に格納
            blockController.ArrayStore();

            //状態を停止に
            fallState = FallState.STOP;
            gameController.Create();
            break;
            #endregion

        case FallState.STOP:

            break;
        }

        //着地
        UpdateLanding();

        //状態がゲーム中では無かったら
        if (gameController.gameState != GameController.GameState.PLAY)
        {
            //状態を停止に
            fallState = FallState.STOP;
        }

#if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID
        //状態が落下中だったら
        if (fallState == FallState.FREEFALL || fallState == FallState.FAST_FALL)
        {
            if (touchController.fastFall)
            {
                //高速落下
                FastFall();

                touchController.nextFlick = false;
            }
        }
#endif
    }
Exemple #15
0
 /// <summary>
 /// ������ԂɈڍs
 /// </summary>
 protected void ChangeFallState()
 {
     state = new FallState(this);
     SoundManager.Play(SoundManager.fall);
 }
    private void ConstructFSM()
    {
        IdleState idle = new IdleState();

        idle.AddTransition(FSMTransitionType.CanBeMove, FSMStateType.Move);
        idle.AddTransition(FSMTransitionType.AttackWithSingleWield, FSMStateType.SingleWieldAttack);
        idle.AddTransition(FSMTransitionType.AttackWithDoubleHands, FSMStateType.DoubleHandsAttack);
        idle.AddTransition(FSMTransitionType.UsingRipple, FSMStateType.RippleAttack);
        idle.AddTransition(FSMTransitionType.UsingHeartAttack, FSMStateType.HeartAttack);
        idle.AddTransition(FSMTransitionType.UsingStygianDesolator, FSMStateType.StygianDesolator);
        idle.AddTransition(FSMTransitionType.UsingIceArrow, FSMStateType.IceArrow);
        idle.AddTransition(FSMTransitionType.UsingChoshimArrow, FSMStateType.ChoshimArrow);
        idle.AddTransition(FSMTransitionType.CanPickUp, FSMStateType.PickUp);
        idle.AddTransition(FSMTransitionType.UsingThunderBolt, FSMStateType.ThunderBolt);
        idle.AddTransition(FSMTransitionType.AttackWithSpear, FSMStateType.SpearAttack);
        idle.AddTransition(FSMTransitionType.CanDefend, FSMStateType.Defend);
        idle.AddTransition(FSMTransitionType.Falling, FSMStateType.Fall);

        MoveState move = new MoveState();

        move.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);
        move.AddTransition(FSMTransitionType.AttackWithSingleWield, FSMStateType.SingleWieldAttack);
        move.AddTransition(FSMTransitionType.AttackWithDoubleHands, FSMStateType.DoubleHandsAttack);
        move.AddTransition(FSMTransitionType.AttackWithSpear, FSMStateType.SpearAttack);



        DefendState defend = new DefendState();

        defend.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        SingleWieldAttackState singleWieldAttack = new SingleWieldAttackState();

        singleWieldAttack.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);
        singleWieldAttack.AddTransition(FSMTransitionType.AttackWithSingleWield, FSMStateType.SingleWieldAttack);
        singleWieldAttack.AddTransition(FSMTransitionType.CanBeMove, FSMStateType.Move);

        DoubleHandsAttackState dualWieldAttack = new DoubleHandsAttackState();

        dualWieldAttack.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);
        dualWieldAttack.AddTransition(FSMTransitionType.AttackWithDoubleHands, FSMStateType.DoubleHandsAttack);
        dualWieldAttack.AddTransition(FSMTransitionType.CanBeMove, FSMStateType.Move);


        SpearAttackState spearAttack = new SpearAttackState();

        spearAttack.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);
        spearAttack.AddTransition(FSMTransitionType.CanBeMove, FSMStateType.Move);

        RippleAttackState rippleAttack = new RippleAttackState();

        rippleAttack.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        HeartAttackState heartAttack = new HeartAttackState();

        heartAttack.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        StygianDesolatorState stygianDesolator = new StygianDesolatorState();

        stygianDesolator.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        IceArrowState iceArrow = new IceArrowState();

        iceArrow.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        ChoshimArrowState choshimArrow = new ChoshimArrowState();

        choshimArrow.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        ThunderBoltState thunderBolt = new ThunderBoltState();

        thunderBolt.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        PickUpState pickUp = new PickUpState();

        pickUp.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);

        FallState fall = new FallState();

        fall.AddTransition(FSMTransitionType.IsIdle, FSMStateType.Idle);



        AddFSMState(idle);
        AddFSMState(move);
        AddFSMState(defend);
        AddFSMState(singleWieldAttack);
        AddFSMState(dualWieldAttack);
        AddFSMState(rippleAttack);
        AddFSMState(heartAttack);
        AddFSMState(stygianDesolator);
        AddFSMState(iceArrow);
        AddFSMState(choshimArrow);
        AddFSMState(thunderBolt);
        AddFSMState(pickUp);
        AddFSMState(spearAttack);
        AddFSMState(fall);
    }
Exemple #17
0
 public FallingTileState(FallState state, float distance, float time)
 {
     State    = state;
     Distance = distance;
     Time     = time;
 }
Exemple #18
0
 /// <summary>
 /// 落下状態に移行
 /// </summary>
 protected void ChangeFallState()
 {
     state = new FallState(this);
     SoundManager.Play(SoundManager.fall);
 }
Exemple #19
0
    void Start()
    {
        playerModelDefaultRotation = playerModel.transform.localRotation;
        playerModelClimbRotation   = Quaternion.identity;
        playerModelTauntRotation.SetLookRotation(new Vector3(0, 0, -1), new Vector3(0, 1, 0));

        attackCollider.enabled = false;
        lightningGenerator.SetActive(false);    // temp
        dashAttackCollider.enabled = false;

        shieldCollider.enabled = false;
        ShowShield(false);

        ShowHorn(false);

        playerAnimator = GetComponent <Animator>();

        GameObject.FindGameObjectWithTag("GameSession").GetComponent <SavePlayerState>().RecoverPlayerStatusValues(this);
        staminaRecovery     = 0.0f;
        fullStaminaRecovery = false;

        GameObject guiObject = GameObject.Find("GUI");

        if (guiObject)
        {
            guiManager = guiObject.GetComponent <GUIManager>();
        }

        activeRespawnPoint = initialPosition;
        cameraFade         = GameObject.Find("PlayerCamera").GetComponent <CameraFade>();

        attack    = new AttackState(CalculateFramesFromTime(attackDuration));
        cast      = new CastState(CalculateFramesFromTime(castDuration));
        climb     = new ClimbState();
        dash      = new DashState(CalculateFramesFromTime(dashDuration));
        dead      = new DeadState(CalculateFramesFromTime(deadDuration));
        defense   = new DefenseState();
        drink     = new DrinkState(CalculateFramesFromTime(drinkDuration));
        fall      = new FallState();
        fallcloud = new FallCloudState(CalculateFramesFromTime(fallCloudDuration));
        hit       = new HitState(CalculateFramesFromTime(hitDuration));
        idle      = new IdleState();
        jump      = new JumpState(CalculateFramesFromTime(GetComponent <PlayerMove>().timeToJumpApex));
        refill    = new RefillState(CalculateFramesFromTime(refillDuration));
        taunt     = new TauntState(CalculateFramesFromTime(tauntDuration));
        walk      = new WalkState();
        SetState(idle);

        facingRight          = true;
        jumpAvailable        = true;
        climbLadderAvailable = false;
        beerRefillAvailable  = false;

        justHit            = false;
        jumpFrames         = 0;
        framesInDelayCount = 0;

        camFollow = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraFollow>();

        colliderSize = GetComponent <BoxCollider>().size;

        godMode = false;
    }
Exemple #20
0
    public ControlSpMovement(ref IMovementAndMeleeCombatLogic input, ref IMove characterController
                             , ref Animator animator, ref IRangedCombatLogic rangedLogic, ref IInvertoryLogic invertoryLogic, ref ISpCameraFollow camera)
    {
        this.rangedInput = rangedLogic;
        this.rangedInput.InputChanged += RangedInput_InputChanged;
        this.invertoryInput            = invertoryLogic;
        this.spCamera = camera;

        // Movement FSM setup
        this.movementAndMeleeControl = input;
        this.fSMSpMovement           = new FSMachineSpacemarineMove(EMovementID.Walking, ref this.movementAndMeleeControl, true);

        WalkState  walkState  = new WalkState(true, 2.0f, ref characterController, ref this.movementAndMeleeControl, EMovementID.Walking, ref animator);
        RunState   runState   = new RunState(false, 5.0f, ref characterController, ref this.movementAndMeleeControl, EMovementID.Running, ref animator);
        SmashState smashState = new SmashState(false, 6.0f, 1.25f, ref characterController, ref this.movementAndMeleeControl, EMovementID.Smashing, ref animator);
        FallState  fallState  = new FallState(2.0f, -Physics.gravity.y * Vector3.down, true, ref characterController, ref this.movementAndMeleeControl, EMovementID.Falling, ref animator);
        LandState  landState  = new LandState(0.75f, false, ref input, ref characterController, EMovementID.Landing);

        this.fSMSpMovement.AddState(walkState);
        this.fSMSpMovement.AddState(runState);
        this.fSMSpMovement.AddState(smashState);
        this.fSMSpMovement.AddState(fallState);
        this.fSMSpMovement.AddState(landState);
        this.fSMSpMovement.SetDefaultState(walkState);

        this.fSMSpMovement.StateChanged += FSMSpMovement_StateChanged;

        // Melee FSM machine setup
        AttackState attackState = new AttackState(false, EMeleeAttackID.Attacking, ref this.movementAndMeleeControl, ref invertoryLogic, ref animator);
        MeleeIdle   meleeIdle   = new MeleeIdle(true, EMeleeAttackID.Idle, ref this.movementAndMeleeControl);

        this.fSMSpCombat = new FSMCombatSpacemarine(true, EMeleeAttackID.Idle, ref this.movementAndMeleeControl, ref invertoryLogic);

        this.fSMSpCombat.AddState(attackState);
        this.fSMSpCombat.AddState(meleeIdle);
        this.fSMSpCombat.SetDefaultState(meleeIdle);

        //Ranged FSM setup
        IHoldWeapon       holdWeaponInfo = new HoldPistol(5.0f);
        IRangedState      holdState      = new HoldState(true, ref rangedLogic, ERangedAttackID.Hold, ref holdWeaponInfo, ref animator, ref invertoryInput);
        IRangedShootState shootState     = new ShootState(true, ERangedAttackID.Shoot, ref rangedLogic, ref animator, ref invertoryLogic);
        IRangedState      reloadState    = new ReloadState(true, ref rangedLogic, ERangedAttackID.Reload, ref invertoryLogic, ref animator);
        IRangedState      laydownState   = new LaydownState(true, ref rangedLogic, ERangedAttackID.LayDown, ref invertoryLogic);

        this.fSMSpRangedCombat = new FSMRangedSpacemarine(true, ERangedAttackID.LayDown, ref rangedLogic, ref invertoryLogic);

        this.fSMSpRangedCombat.AddState(holdState);
        this.fSMSpRangedCombat.AddState(reloadState);
        this.fSMSpRangedCombat.AddState(shootState);
        this.fSMSpRangedCombat.AddState(laydownState);
        this.fSMSpRangedCombat.SetDefaultState(laydownState);

        this.fSMSpRangedCombat.StateChanged += FSMSpRangedCombat_StateChanged;

        // Invertory Setup
        InvertoryIdle   invertoryIdleState   = new InvertoryIdle(true, ref invertoryLogic);
        InvertorySwitch invertorySwitchState = new InvertorySwitch(true, ref invertoryLogic, ref animator);

        this.fSMInvertory = new FSMInvertory(EInvertoryStateID.None, ref invertoryLogic);

        this.fSMInvertory.AddState(invertoryIdleState);
        this.fSMInvertory.AddState(invertorySwitchState);
        this.fSMInvertory.SetDefaultState(invertoryIdleState);

        this.fSMInvertory.StateChanged += FSMInvertory_StateChanged;

        if (invertoryLogic.HasInputModel)
        {
            this.spCamera.ObjectRotator.CanRotate = !invertoryLogic.InputInfo.CurrentWeapons.IsMeleeEquipment;
            this.spCamera.IsMeleeViewEnabled      = !invertoryLogic.InputInfo.CurrentWeapons.IsMeleeEquipment;
        }
        else
        {
            this.spCamera.IsMeleeViewEnabled = false;
        }
    }
 public void StopFalling()
 {
     this.fallState = FallState.Done;
 }
 void Start()
 {
     this.healthComponent = GetComponent <PlayerHealthComponent>();
     this.playerAnimator  = GetComponent <Animator>();
     this.fallState       = FallState.Setup;
 }