public static void Postfix(CyclopsMotorModeButton __instance, bool __state)
 {
     if (__state)
     {
         SubRoot cyclops = (SubRoot)__instance.ReflectionGet("subRoot");
         string  guid    = GuidHelper.GetGuid(cyclops.gameObject);
         NitroxServiceLocator.LocateService <Cyclops>().ChangeEngineMode(guid, __instance.motorModeIndex);
     }
 }
 public static void Postfix(CyclopsMotorModeButton __instance, bool __state)
 {
     if (__state)
     {
         SubRoot  cyclops = (SubRoot)__instance.ReflectionGet("subRoot");
         NitroxId id      = NitroxEntity.GetId(cyclops.gameObject);
         NitroxServiceLocator.LocateService <Cyclops>().BroadcastChangeEngineMode(id, __instance.motorModeIndex);
     }
 }
 public static void Postfix(CyclopsMotorModeButton __instance, bool __state)
 {
     if (__state)
     {
         SubRoot cyclops = (SubRoot)__instance.ReflectionGet("subRoot");
         String  guid    = GuidHelper.GetGuid(cyclops.gameObject);
         Multiplayer.Logic.Cyclops.ChangeEngineMode(guid, __instance.motorModeIndex);
     }
 }
 public static void Postfix(CyclopsMotorModeButton __instance, bool __state)
 {
     if (__state)
     {
         SubRoot  cyclops = __instance.subRoot;
         NitroxId id      = NitroxEntity.GetId(cyclops.gameObject);
         Resolve <Cyclops>().BroadcastChangeEngineMode(id, __instance.motorModeIndex);
     }
 }
        public static bool Prefix(CyclopsMotorModeButton __instance, out bool __state)
        {
            SubRoot cyclops = (SubRoot)__instance.ReflectionGet("subRoot");

            if (cyclops != null && cyclops == Player.main.currentSub)
            {
                CyclopsHelmHUDManager cyclops_HUD = cyclops.gameObject.RequireComponentInChildren <CyclopsHelmHUDManager>();
                //To show the Cyclops HUD every time "hudActive" have to be true. "hornObject" is a good indicator to check if the player piloting the cyclops.
                if ((bool)cyclops_HUD.ReflectionGet("hudActive"))
                {
                    __state = cyclops_HUD.hornObject.activeSelf;
                    return(cyclops_HUD.hornObject.activeSelf);
                }
            }
            __state = false;
            return(false);
        }
Ejemplo n.º 6
0
 private static void Postfix(CyclopsMotorModeButton __instance)
 {
     HandReticle_LateUpdate.activateCyclopsCrosshairLastHover = Time.realtimeSinceStartup;
 }