Exemple #1
0
        public void AttachWeaponData(WeaponData weaponData)
        {
            if (weaponData == null)
            {
                return;
            }

            if (m_WeaponDatas.Contains(weaponData))
            {
                return;
            }

            m_WeaponDatas.Add(weaponData);
        }
Exemple #2
0
        protected internal override void OnShow(object userData)
#endif
        {
            base.OnShow(userData);

            m_WeaponData = userData as WeaponData;
            if (m_WeaponData == null)
            {
                Log.Error("Weapon data is invalid.");
                return;
            }

            GameEntry.Entity.AttachEntity(Entity, m_WeaponData.OwnerId, AttachPoint);
        }
 public static void ShowWeapon(this EntityComponent entityComponent, WeaponData data)
 {
     entityComponent.ShowEntity(typeof(Weapon), "Weapon", Constant.AssetPriority.WeaponAsset, data);
 }
Exemple #4
0
 public static void ShowWeapon(this EntityComponent entityComponent, WeaponData data)
 {
     entityComponent.ShowEntity(typeof(Weapon), "Weapon", data);
 }