Exemplo n.º 1
0
 public WeaponCustomizerConfigurator GetBaseConfigurator()
 {
     if (m_Weapon != null)
     {
         m_Configurator = m_Weapon.GetComponent <WeaponCustomizerConfigurator>();
     }
     return(m_Configurator);
 }
Exemplo n.º 2
0
    public void Activate()
    {
        if (m_Weapon != null)
        {
            m_Configurator = m_Weapon.GetComponent <WeaponCustomizerConfigurator>();
        }
        if (m_Configurator != null)
        {
            m_Configurator.SetActiveConfig(m_Weapon, this);
            m_Weapon.name = m_Configurator.m_BaseName + " " + m_Configurator.m_WeaponProfiles[m_ProfileConfig].m_ProfileName;

            m_Item = GetComponent <Opsive.UltimateCharacterController.Items.Item>();
            if (m_Item != null)
            {
                SetItem();
            }
            m_Shootable = GetComponent <Opsive.UltimateCharacterController.Items.Actions.ShootableWeapon>();
            if (m_Shootable != null)
            {
                SetShootable();
            }
            m_TPCShootable = GetComponent <Opsive.UltimateCharacterController.ThirdPersonController.Items.ThirdPersonShootableWeaponProperties>();
            if (m_TPCShootable != null)
            {
                SetTPCShootable();
            }
            m_Melee = GetComponent <Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon>();
            if (m_Melee != null)
            {
            }
            m_TPCMelee = GetComponent <Opsive.UltimateCharacterController.ThirdPersonController.Items.ThirdPersonMeleeWeaponProperties>();
            if (m_TPCMelee != null)
            {
            }
            m_Pickup = GetComponent <Opsive.UltimateCharacterController.Objects.CharacterAssist.ItemPickup>();
            if (m_Pickup != null)
            {
                SetPickup();
            }
        }
    }