public static void Postfix(Rocket __instance, bool up, Rocket.RocketElevatorStates __state) { if (__state != __instance.elevatorState) { Rockets rocket = NitroxServiceLocator.LocateService <Rockets>(); GameObject gameObject = __instance.gameObject; NitroxId id = NitroxEntity.GetId(gameObject); rocket.CallElevator(id, RocketElevatorPanel.EXTERNAL_PANEL, up); } }
public static void Postfix(Rocket __instance, RocketElevatorStates __state) { if (__state != __instance.elevatorState) { Rockets rocket = NitroxServiceLocator.LocateService <Rockets>(); GameObject gameObject = __instance.gameObject; NitroxId id = NitroxEntity.GetId(gameObject); bool isGoingUp = __instance.elevatorState == RocketElevatorStates.Up || __instance.elevatorState == RocketElevatorStates.AtTop; rocket.CallElevator(id, RocketElevatorPanel.INTERNAL_PANEL, isGoingUp); } }