예제 #1
0
 protected override void StateActions()
 {
     if (m_weapon != null)
     {
         m_weapon.AttackInput(true, false);
         if (!m_weapon.m_attacking && previousAttackingState)            // end of weapon attack
         {
             m_stateManager.SetNextState(m_endTransition.m_nextState);
         }
         previousAttackingState = m_weapon.m_attacking;
     }
 }
예제 #2
0
    // Update is called once per frame
    protected override void Update()
    {
        base.Update();
        //Player Weapons
        BaseWeapon weapon = m_inventory.GetCurrentWeapon().GetComponentInChildren <BaseWeapon>();

        if (weapon != null)
        {
            weapon.AttackInput(InputManager.m_instance.GetInputBool("LightAttack"), InputManager.m_instance.GetInputBool("HeavyAttack"));
        }

        if (InputManager.m_instance.GetInputBool("SwapWeapon"))
        {
            m_inventory.SwapWeapon();
        }
    }