public void RewindTo(IEvent value) { FireEvent right = value as FireEvent; audioFireMode = right.audioFireMode; fireWeaponId = right.fireWeaponId; audioFirePos = right.audioFirePos; }
public void RewindTo(IEvent value) { FireEvent right = value as FireEvent; owner = right.owner; fireEffectType = right.fireEffectType; pitch = right.pitch; yaw = right.yaw; weaponId = right.weaponId; }
/// <summary> /// </summary> /// <param name="contexts"></param> /// <param name="entity"></param> /// <param name="e"></param> public override void DoEventClient(IContexts contexts, IEntity entity, IEvent e) { FireEvent evt = e as FireEvent; if (evt != null) { var effectCfg = SingletonManager.Get <WeaponConfigManagement>().FindConfigById(evt.weaponId) .S_EffectConfig as DefaultWeaponEffectConfig; if (effectCfg == null) { return; } Contexts ctx = contexts as Contexts; PlayerEntity player = ctx.player.GetEntityWithEntityKey(evt.owner); if (evt.fireEffectType != FireEvent.FireEffectType.EnjectOnly) { var muzzleTrans = player.characterBoneInterface.CharacterBone.GetLocation(SpecialLocation.MuzzleEffectPosition, CharacterView.ThirdPerson); if (muzzleTrans) { ClientEffectFactory.CreateMuzzleSparkEffct(muzzleTrans.position, evt.pitch, evt.yaw, effectCfg.Spark, muzzleTrans); } } if (evt.fireEffectType != FireEvent.FireEffectType.MuzzleOnly) { var ejectTrans = player.characterBoneInterface.CharacterBone.GetLocation(SpecialLocation.EjectionLocation, CharacterView.ThirdPerson); if (ejectTrans) { ClientEffectFactory.CreateBulletDrop(ejectTrans.position, evt.yaw, evt.pitch, effectCfg.BulletDrop, evt.weaponId, AudioGrp_FootMatType.Concrete); } } // var weaponGo = (entity as PlayerEntity).appearanceInterface.Appearance.GetWeaponP1InHand(); // GameAudioMedia.PlayWeaponFireAudio(evt.fireWeaponId, evt.audioFirePos, (AudioGrp_ShotMode)evt.audioFireMode); } // GameAudioMedium.ProcessWeaponAudio(playerEntity,allContexts,(item)=>item.Fire); // if (playerEntity.appearanceInterface.Appearance.IsFirstPerson) // { // } // else // { //// GameAudioMedium.PerformOnGunFire(); // } }
/// <summary> /// /// </summary> /// <param name="contexts"></param> /// <param name="entity"></param> /// <param name="e"></param> public override void DoEventClient(Entitas.IContexts contexts, IEntity entity, IEvent e) { FireEvent evt = e as FireEvent; if (evt != null) { if ((entity as PlayerEntity).isFlagSelf) { return; } // var weaponGo = (entity as PlayerEntity).appearanceInterface.Appearance.GetWeaponP1InHand(); // GameAudioMedia.PlayWeaponFireAudio(evt.fireWeaponId, evt.audioFirePos, (AudioGrp_ShotMode)evt.audioFireMode); } // GameAudioMedium.ProcessWeaponAudio(playerEntity,allContexts,(item)=>item.Fire); // if (playerEntity.appearanceInterface.Appearance.IsFirstPerson) // { // } // else // { //// GameAudioMedium.PerformOnGunFire(); // } }