public void SendShot(SendShotToServerEvent evt, UnblockedWeaponNode weaponNode) { SelfShotEvent eventInstance = new SelfShotEvent(); if (evt.TargetingData.BestDirection != null) { eventInstance.ShotDirection = evt.TargetingData.BestDirection.Dir; } else { eventInstance.ShotDirection = new MuzzleLogicAccessor(weaponNode.muzzlePoint, weaponNode.weaponInstance).GetFireDirectionWorld(); } base.ScheduleEvent(eventInstance, weaponNode); }
public void ShakeOnShot(SelfShotEvent e, NotVulcanKickbackNode weapon, [JoinByTank] SelfTankNode tank, [JoinAll] CameraShakerNode cameraShaker, [JoinAll] SingleNode <GameCameraShakerSettingsComponent> settings, [JoinAll] SingleNode <MainHUDComponent> hud) { cameraShaker.cameraShaker.ShakeOnce(settings.component, weapon.kickbackCameraShakerConfig, weapon.weaponCooldown.CooldownIntervalSec); hud.component.battleHudRoot.ShakeHUDOnShot(settings.component, weapon.kickbackCameraShakerConfig); }