// ====================================================================================== // 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(); } }
// 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; } }
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; }
public void Start() { m_timer = 0; m_objHand.Drop(); }