Ejemplo n.º 1
0
        public static EntityKey CreateCustomizeWeapon(EntityKey lastKey, EntityKey owner, int configId)
        {
            if (lastKey.IsValid())
            {
                WeaponEntity currWeapon = WeaponEntityFactory.GetWeaponEntity(lastKey);
                if (currWeapon != null)
                {
                    WeaponEntityFactory.RemoveWeaponEntity(currWeapon);
                }
            }
            WeaponEntity newWeapon = WeaponEntityFactory.CreateEntity(WeaponUtil.CreateScan(configId));

            newWeapon.SetRetain(owner);
            return(newWeapon.entityKey.Value);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// sync from event of playerEntiy.BagSet.WeaponSlot Component
 /// </summary>
 /// <param name="entityKey"></param>
 internal void Sync(EntityKey entityKey)
 {
     entity = WeaponEntityFactory.GetWeaponEntity(WeaponContext, entityKey);
 }
Ejemplo n.º 3
0
 private static WeaponEntity FindEmptyWeaponEntity(this PlayerEntity player)
 {
     return(WeaponEntityFactory.GetWeaponEntity(player.playerWeaponCustomize.EmptyConstWeaponkey));
 }
Ejemplo n.º 4
0
 private static WeaponEntity FindGrenadeWeaponEntity(this PlayerEntity player)
 {
     return(WeaponEntityFactory.GetWeaponEntity(player.playerWeaponCustomize.GrenadeConstWeaponKey));
 }