using QSB.Audio; using QSB.Player; using UnityEngine; namespace QSB.Animation.Player.Thrusters; internal static class ThrusterManager { public static void CreateRemotePlayerVFX(PlayerInfo player) { var newVfx = player.Body.transform.Find("REMOTE_PlayerVFX").gameObject; InitWashController(newVfx.transform.Find("ThrusterWash").gameObject, player); InitFlameControllers(newVfx, player); InitParticleControllers(newVfx, player); } public static void CreateRemotePlayerSFX(PlayerInfo player) { player.Body.GetComponentInChildren(true)?.Init(player); } private static void InitFlameControllers(GameObject root, PlayerInfo player) { var existingControllers = root.GetComponentsInChildren(true); foreach (var controller in existingControllers) { controller.Init(player); } } private static void InitParticleControllers(GameObject root, PlayerInfo player) { var existingBehaviours = root.GetComponentsInChildren(true); foreach (var item in existingBehaviours) { item.Init(player); } } private static void InitWashController(GameObject root, PlayerInfo player) { var newObj = root.GetComponent(); newObj.Init(player); } }