예제 #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);
        }
예제 #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);
 }
예제 #3
0
 private static WeaponEntity FindEmptyWeaponEntity(this PlayerEntity player)
 {
     return(WeaponEntityFactory.GetWeaponEntity(player.playerWeaponCustomize.EmptyConstWeaponkey));
 }
예제 #4
0
 private static WeaponEntity FindGrenadeWeaponEntity(this PlayerEntity player)
 {
     return(WeaponEntityFactory.GetWeaponEntity(player.playerWeaponCustomize.GrenadeConstWeaponKey));
 }