コード例 #1
0
        internal static void Postfix(ref float __result, GameObject target)
        {
            Vehicle vehicle = target.GetComponent <Vehicle>();

            if (vehicle != null) // Target is vehicle
            {
                __result = VehicleUpgrader.ReduceIncomingDamage(vehicle, __result);
            }
        }
コード例 #2
0
        internal static void Postfix(ref CrushDamage __instance)
        {
            var seamoth = __instance.GetComponentInParent <SeaMoth>();
            var exosuit = __instance.GetComponentInParent <Exosuit>();

            if (seamoth != null)
            {
                VehicleUpgrader.UpgradeSeaMoth(seamoth);
            }
            else if (exosuit != null)
            {
                VehicleUpgrader.UpgradeExosuit(exosuit);
            }
        }
コード例 #3
0
        internal static void Postfix(ref float __result, GameObject target)
        {
            var vehicle = target.GetComponent <Vehicle>();

            if (vehicle != null) // Target is vehicle
            {
                var vehicleUpgrader = VehicleUpgrader.GetUpgrader(vehicle);

                if (vehicleUpgrader == null)
                {
                    return;
                }

                __result = vehicleUpgrader.GeneralDamageReduction * __result;
            }
        }
コード例 #4
0
 internal static void Postfix(ref Exosuit __instance, TechType techType)
 {
     VehicleUpgrader.GetUpgrader(__instance)?.UpgradeVehicle(techType);
 }
コード例 #5
0
 internal static void Postfix(ref Vehicle __instance)
 {
     VehicleUpgrader.UpgradeVehicle(__instance);
 }
コード例 #6
0
 internal static void Postfix(Vehicle __instance, TechType techType)
 {
     VehicleUpgrader.UpgradeVehicle(__instance, techType);
 }
コード例 #7
0
 internal static void Postfix(ref SeaMoth __instance)
 {
     VehicleUpgrader.UpgradeSeaMoth(__instance);
 }
コード例 #8
0
 internal static void Postfix(ref Exosuit __instance, TechType techType)
 {
     VehicleUpgrader.UpgradeExosuit(__instance, techType);
 }