コード例 #1
0
            public static bool TrySwitchToFly(PlayerMove_Walk __instance)
            {
#if DEBUG
                ModDebug.Log("Try Switch To Fly");
#endif

                //if (__instance.mecha.thrusterLevel < 1)
                if (__instance.mecha.thrusterLevel < THRUSTER_LEVEL_FLY)
                {
                    return(false);
                }

                __instance.jumpCoolTime = 0.3f;
                __instance.jumpedTime   = 0.0f;

                __instance.flyUpChance = 0.0f;
                __instance.SwitchToFly();

                return(true);
            }
コード例 #2
0
            public static bool TrySwitchToFly(PlayerMove_Walk __instance)
            {
#if DEBUG
                ModDebug.Log("TrySwitchToFly");
#endif

                if (__instance.mecha.thrusterLevel >= 1)
                {
                    __instance.jumpCoolTime = 0.3f;
                    __instance.jumpedTime   = 0.0f;

                    __instance.flyUpChance = 0.0f;
                    __instance.SwitchToFly();

                    return(true);
                }
                else
                {
                    return(false);
                }
            }