public override void Initialize(ModuleWaterfallFX host) { base.Initialize(host); engineController = host.GetComponents <ModuleEngines>().ToList().Find(x => x.engineID == host.engineID); if (engineController == null) { engineController = host.GetComponent <ModuleEngines>(); } if (engineController == null) { Utils.LogError("[EngineEventController] Could not find engine controller on Initialize"); } if (eventName == "flameout") { eventReady = engineController.EngineIgnited; if (engineController.EngineIgnited) { enginePreState = true; } } if (eventName == "ignition") { eventReady = !engineController.EngineIgnited; if (engineController.EngineIgnited) { enginePreState = false; } } }
public override void Initialize(ModuleWaterfallFX host) { base.Initialize(host); rcsController = host.GetComponents <ModuleRCSFX>().ToList().First(); if (rcsController == null) { rcsController = host.GetComponent <ModuleRCSFX>(); } if (rcsController == null) { Utils.LogError("[RCSController] Could not find ModuleRCSFX on Initialize"); } }
public override void Initialize(ModuleWaterfallFX host) { base.Initialize(host); engineController = host.GetComponents <ModuleEngines>().ToList().Find(x => x.engineID == host.engineID); if (engineController == null) { engineController = host.GetComponent <ModuleEngines>(); } if (engineController == null) { Utils.LogError("[ThrottleController] Could not find engine controller on Initialize"); } }
public override void Initialize(ModuleWaterfallFX host) { base.Initialize(host); engineController = host.GetComponents <ModuleEngines>().FirstOrDefault(x => x.engineID == engineID); if (engineController == null) { Utils.Log($"[{nameof(CustomPullController)}]: Could not find engine ID {engineID}, using first module if available"); engineController = host.GetComponent <ModuleEngines>(); } if (engineController == null) { Utils.LogError($"[{nameof(CustomPullController)}]: Could not find any {nameof(ModuleEngines)} to use with {nameof(CustomPullController)} named {name}, effect controller will not do anything"); return; } pullValueMethod = FindSuitableMemberOnEnginesModule(); }
public override void Initialize(ModuleWaterfallFX host) { base.Initialize(host); rcsController = host.GetComponents <ModuleRCSFX>().ToList().Find(x => x.thrusterTransformName == thrusterTransformName); if (rcsController == null) { rcsController = host.GetComponent <ModuleRCSFX>(); } if (rcsController == null) { Utils.LogError("[RCSController] Could not find ModuleRCSFX on Initialize"); return; } currentThrottle = new List <float>(rcsController.thrusterTransforms.Count); for (int i = 0; i < rcsController.thrusterTransforms.Count; i++) { currentThrottle.Add(0f); } }