예제 #1
0
 public void AddAuxEffect(EClientEffectType effectType)
 {
     if (RelatedWeaponAux.EffectList != null)
     {
         RelatedWeaponAux.EffectList.Add(effectType);
     }
 }
예제 #2
0
 public void AddAuxEffect(EClientEffectType effectType)
 {
     if (playerWeaponAgent.AuxCache.EffectList != null)
     {
         playerWeaponAgent.AuxCache.EffectList.Add(effectType);
     }
 }
예제 #3
0
 internal void AddAuxEffect(EClientEffectType effectType)
 {
     if (WeaponAux.EffectList != null)
     {
         WeaponAux.EffectList.Add(effectType);
     }
 }
예제 #4
0
 public virtual void OnCreate(EClientEffectType type, int effectId)
 {
     _effectConfig = SingletonManager.Get <ClientEffectConfigManager>().GetConfigItemById(effectId);
     if (null != _effectConfig)
     {
         if (null != _effectConfig.Asset)
         {
             Asset = new AssetInfo(_effectConfig.Asset.BundleName, _effectConfig.Asset.AssetName);
         }
     }
 }
예제 #5
0
 public ClientEffectCommonConfigItem GetConfigByType(EClientEffectType type)
 {
     if (_configs.ContainsKey(type))
     {
         return(_configs[type]);
     }
     else
     {
         Logger.ErrorFormat("{0} does not exist in config", type);
         return(null);
     }
 }
예제 #6
0
        public static void CreateGrenadeExplosionEffect(ClientEffectContext context,
                                                        IEntityIdGenerator entityIdGenerator,
                                                        EntityKey owner, Vector3 position, float yaw, float pitch, int effectId, int effectTime,
                                                        EClientEffectType effectType)
        {
            var entity = CreateBaseEntity(context, entityIdGenerator, position, (int)effectType);

            entity.AddOwnerId(owner);
            entity.lifeTime.LifeTime = effectTime;
            entity.AddEffectId(effectId);
            entity.AddEffectRotation(yaw, pitch);
            entity.AddFlagImmutability(0);
        }
        public ClientEffectConfigItem GetConfigItemByType(EClientEffectType type)
        {
            if (!_typeDic.ContainsKey(type))
            {
                return(null);
            }

            if (null == _typeDic[type])
            {
                Logger.ErrorFormat("config with type {0} is null ! ", type);
            }
            return(_typeDic[type]);
        }
        private void PlayOneEffect(ThrowingEntity throwing, int effectId, Vector3 effectPos, bool isBomb)
        {
            var entityIdGenerator = _contexts.session.commonSession.EntityIdGenerator;

            EClientEffectType effectType = EClientEffectType.GrenadeExplosion;
            int effectTime  = _bombEffectTime;
            var bombAudioId = Core.EAudioUniqueId.GrenadeExplosion;

            if (isBomb)
            {
                //爆炸特效类型
                switch ((EWeaponSubType)throwing.throwingData.WeaponSubType)
                {
                case EWeaponSubType.Grenade:
                    effectType = EClientEffectType.GrenadeExplosion;
                    break;

                case EWeaponSubType.FlashBomb:
                    effectType  = EClientEffectType.FlashBomb;
                    bombAudioId = Core.EAudioUniqueId.FlashBombExplosion;
                    break;

                case EWeaponSubType.FogBomb:
                    effectType  = EClientEffectType.FogBomb;
                    bombAudioId = Core.EAudioUniqueId.FoggyBombExplosion;
                    effectTime  = _fogBombEffectTime;
                    break;

                case EWeaponSubType.BurnBomb:
                    effectType = EClientEffectType.BurnBomb;
                    break;
                }
            }
            else
            {
                bombAudioId = EAudioUniqueId.None;
            }
            if (effectId > 0)
            {
                float effectYaw    = throwing.throwingData.IsFly ? 0 : 1;
                var   effectEntity = ClientEffectFactory.CreateGrenadeExplosionEffect(_contexts.clientEffect, entityIdGenerator,
                                                                                      throwing.ownerId.Value, effectPos, effectYaw, 0, effectId, effectTime, effectType);
                if (effectEntity.hasAudio)
                {
                    effectEntity.RemoveAudio();
                }
                effectEntity.AddAudio((int)AudioClientEffectType.ThrowExplosion);
                effectEntity.audio.AudioClientEffectArg1 = (int)bombAudioId;
            }
        }
        private void PlayOneEffect(ThrowingEntity throwing, int effectId, Vector3 effectPos, bool isBomb)
        {
            var entityIdGenerator = _contexts.session.commonSession.EntityIdGenerator;


            EClientEffectType effectType = EClientEffectType.GrenadeExplosion;
            int effectTime = _bombEffectTime;

            if (isBomb)
            {
                //爆炸特效类型
                switch ((EWeaponSubType)throwing.throwingData.WeaponSubType)
                {
                case EWeaponSubType.Grenade:
                    effectType = EClientEffectType.GrenadeExplosion;
                    break;

                case EWeaponSubType.FlashBomb:
                    effectType = EClientEffectType.FlashBomb;
                    break;

                case EWeaponSubType.FogBomb:
                    effectType = EClientEffectType.FogBomb;
                    effectTime = _fogBombEffectTime;
                    break;

                case EWeaponSubType.BurnBomb:
                    effectType = EClientEffectType.BurnBomb;
                    break;
                }
            }

            if (effectId > 0)
            {
                float effectYaw = throwing.throwingData.IsFly ? 0 : 1;
                ClientEffectFactory.CreateGrenadeExplosionEffect(_contexts.clientEffect, entityIdGenerator,
                                                                 throwing.ownerId.Value, effectPos, effectYaw, 0, effectId, effectTime, effectType);
            }
        }
예제 #10
0
 public void OnCreate(EClientEffectType type, int effectId)
 {
 }