public void CreateBlockedExplosionEffect(BaseShotEvent evt, BlockedWeaponNode node) { HitExplosionGraphicsComponent hitExplosionGraphics = node.hitExplosionGraphics; WeaponBlockedComponent weaponBlocked = node.weaponBlocked; Vector3 position = weaponBlocked.BlockPoint - (evt.ShotDirection * hitExplosionGraphics.ExplosionOffset); if (hitExplosionGraphics.UseForBlockedWeapon) { this.DrawExplosionEffect(position, weaponBlocked.BlockNormal, hitExplosionGraphics.ExplosionAsset, hitExplosionGraphics.ExplosionDuration, node); } }
public void PrepareSplashTargetsWhenBlockedWeapon(ShotPrepareEvent evt, BlockedWeaponNode weapon) { WeaponBlockedComponent weaponBlocked = weapon.weaponBlocked; StaticHit staticHit = new StaticHit { Position = weaponBlocked.BlockPoint, Normal = weaponBlocked.BlockNormal }; SplashHitData splashHit = SplashHitData.CreateSplashHitData(new List <HitTarget>(), staticHit, weapon.Entity); base.ScheduleEvent(new CollectSplashTargetsEvent(splashHit), weapon); }
public void SendShot(ShotPrepareEvent evt, BlockedWeaponNode weaponNode) { MuzzleLogicAccessor accessor = new MuzzleLogicAccessor(weaponNode.muzzlePoint, weaponNode.weaponInstance); base.ScheduleEvent(new SelfShotEvent(accessor.GetFireDirectionWorld()), weaponNode); }
public void RequestBulletBuild(BaseShotEvent evt, BlockedWeaponNode weaponNode) { MuzzleVisualAccessor accessor = new MuzzleVisualAccessor(weaponNode.muzzlePoint); base.ScheduleEvent(new BulletBuildEvent(accessor.GetFireDirectionWorld()), weaponNode); }