public void PrepareBestDirection(ShotPrepareEvent evt, UnblockedWeaponNode weaponNode, [JoinByTank] SingleNode <TankSyncComponent> tankNode) { TargetingData targetingData = BattleCache.targetingData.GetInstance().Init(); base.ScheduleEvent(new TargetingEvent(targetingData), weaponNode); base.ScheduleEvent(new SendShotToServerEvent(targetingData), weaponNode); }
public void PrepareTargetsByUnblockedWeapon(ShotPrepareEvent evt, UnblockedWeaponNode weaponNode) { TargetingData targetingData = BattleCache.targetingData.GetInstance().Init(); base.ScheduleEvent(new TargetingEvent(targetingData), weaponNode); base.ScheduleEvent(new SendShotToServerEvent(targetingData), weaponNode); base.ScheduleEvent(new SendHitToServerIfNeedEvent(targetingData), weaponNode); }
public void SendShot(ShotPrepareEvent evt, NotUnblockedHammerNode hammer) { SelfHammerShotEvent eventInstance = new SelfHammerShotEvent { RandomSeed = hammer.hammerPelletCone.ShotSeed }; eventInstance.ShotDirection = new MuzzleLogicAccessor(hammer.muzzlePoint, hammer.weaponInstance).GetFireDirectionWorld(); base.ScheduleEvent(eventInstance, hammer); }
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 PrepareQuickShotTargets(ShotPrepareEvent evt, UnblockedShaftNode weapon) { this.PrepareQuickShotTargets(weapon.Entity); }
public void SendShot(ShotPrepareEvent evt, BlockedWeaponNode weaponNode) { MuzzleLogicAccessor accessor = new MuzzleLogicAccessor(weaponNode.muzzlePoint, weaponNode.weaponInstance); base.ScheduleEvent(new SelfShotEvent(accessor.GetFireDirectionWorld()), weaponNode); }
public void DefineCooldownTimerForNextPossibleShot(ShotPrepareEvent evt, CooldownNode cooldown) { base.UpdateCooldownOnShot(cooldown.cooldownTimer, cooldown.weaponCooldown); }
public void CreateShaftMuzzleFlashOnSelfQuickShot(ShotPrepareEvent evt, ShaftMuzzleFlashNode muzzle) { this.InstantiateMuzzleEffect(muzzle.shaftMuzzleFlash.muzzleFlashPrefab, muzzle, muzzle.shaftMuzzleFlash.duration); }