public PowerupAttachable GetMod(ModMount mount) { if (equippedMods.ContainsKey(mount)) { return(equippedMods[mount]); } return(null); }
public void Remove(ModMount slot) { if (equippedMods.ContainsKey(slot)) { equippedMods[slot].GetComponent <PowerupMain>().UnEquip(); equippedMods.Remove(slot); } ReCalcStats(); }
public void Unequipper(string name) { noItem = true; switch (name) { case "FrontWeapons": weaponMount = WeaponMount.Grill; isWeapon = true; break; case "RearWeapons": weaponMount = WeaponMount.Hitch; isWeapon = true; break; case "DoorWeapons": weaponMount = WeaponMount.Doors; isWeapon = true; break; case "RoofWeapons": weaponMount = WeaponMount.Roof; isWeapon = true; break; case "WheelWeapons": weaponMount = WeaponMount.Wheels; isWeapon = true; break; case "EngineMods": modMount = ModMount.Engine; isWeapon = false; break; case "NitroMods": modMount = ModMount.Trunk; isWeapon = false; break; case "ChassisMods": modMount = ModMount.Frame; isWeapon = false; break; case "BumperMods": modMount = ModMount.Bumpers; isWeapon = false; break; case "WheelMods": modMount = ModMount.Tires; isWeapon = false; break; } }
public void ShowUnequippedItem(ModMount mount) { StatPack pack = new StatPack(); PowerupAttachable otherItem = controller.GetCar().GetComponent <PowerupManager>().GetMod(mount); if (otherItem == null) { return; } StatPack otherPack = otherItem.GetComponent <PowerupStats>().GetPack(); ShowStatBars(pack, otherPack); }
public static void TryUpdate(StatPack pack, ModMount mod) { if (ModMin.ContainsKey(mod)) { ModMin[mod] = StatPack.Min(ModMin[mod], pack); ModMax[mod] = StatPack.Max(ModMax[mod], pack); } else { ModMin[mod] = StatPack.Min(new StatPack(), pack); ModMax[mod] = StatPack.Max(new StatPack(), pack); } UpdateMinMax(); }