// ======================================================================================
    // PUBLIC MEMBERS
    // ======================================================================================
    public void Start()
    {
        m_animator = this.gameObject.GetComponent <PlayerAnimatorController>();

        m_actualState = m_states.Length - 1;
        m_actualTimer = 0;
        if (m_watcherToShowWeapon != null)
        {
            m_watcherToShowWeapon.Drop();
        }
    }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        // get pick up item input
        if (InputMgr.GetButton((int)m_input.m_nbPlayer, InputMgr.eButton.GRAB) && !IsGrabing)
        {
            if (WeaponList.Count > 0)
            {
                PickupWeapon();
            }
        }
        IsGrabing = InputMgr.GetButton((int)m_input.m_nbPlayer, InputMgr.eButton.GRAB);

        switch (m_attack.EquipWeap)
        {
        case PlayerAttack.eWeapon.Pistol:
            m_weapon.PickPistol();
            break;

        case PlayerAttack.eWeapon.Saber:
            m_weapon.PickSaber();
            break;

        default:
            m_weapon.Drop();
            break;
        }
    }
示例#3
0
    public void Update()
    {
        if (m_timer > m_duration)
        {
            m_objThrow.SetActive(false);
            m_objHand.PickSaber();
            m_timer = 0;
        }

        if (m_timer > m_ratio * m_duration)
        {
            m_objThrow.SetActive(true);
            m_objThrow.transform.Rotate(new Vector3(0, 0, 100000 * Time.deltaTime));

            m_objHand.Drop();
        }

        m_timer += Time.deltaTime;
    }
示例#4
0
 public void Start()
 {
     m_timer = 0;
     m_objHand.Drop();
 }