Example #1
0
 /// <summary>
 ///
 /// </summary>
 public void ActivateWeapon(int index)
 {
     m_CurrentWeaponIndex = index;
     m_CurrentWeapon      = null;
     if (m_CurrentWeaponIndex > 0)
     {
         m_CurrentWeapon = Weapons[m_CurrentWeaponIndex - 1];
         if (m_CurrentWeapon != null)
         {
             m_CurrentWeapon.ActivateGameObject(true);
         }
     }
 }
Example #2
0
    /// <summary>
    ///
    /// </summary>
    public void ActivateWeapon(int index)
    {
        m_CurrentWeaponIndex = index;
        m_CurrentWeapon      = null;
        if (m_CurrentWeaponIndex > 0)
        {
            m_CurrentWeapon = Weapons[m_CurrentWeaponIndex - 1];
            if (m_CurrentWeapon != null)
            {
                m_CurrentWeapon.ActivateGameObject(true);
            }
        }

        if (m_CurrentWeapon != null)
        {
            m_CurrentShooter = CurrentWeapon.GetComponent <vp_Shooter>();
        }
    }
	/// <summary>
	/// 
	/// </summary>
	public void ActivateWeapon(int index)
	{

		m_CurrentWeaponIndex = index;
		m_CurrentWeapon = null;
		if (m_CurrentWeaponIndex > 0)
		{
			m_CurrentWeapon = Weapons[m_CurrentWeaponIndex - 1];
			if (m_CurrentWeapon != null)
				m_CurrentWeapon.ActivateGameObject(true);
		}

	}