public void equip(PlayerEquip equipping, List <PlayerEquip> Risto) { string Typo = equipping.GetType().Name; print("Type-S: " + Typo); for (int m = 0; m < StatusPlayer.CurrentEquips.Count; m++) { string Typoru = StatusPlayer.CurrentEquips[m].GetType().Name; if (Typoru == Typo) { StatusPlayer.CurrentEquips.RemoveAt(m); } } if (Typo == "Hull") { StatusPlayer.CurrentHull = equipping as Hull; } else if (Typo == "FuelTank") { StatusPlayer.CurrentFuelTank = equipping as FuelTank; } else if (Typo == "Drill") { StatusPlayer.CurrentDrill = equipping as Drill; } else if (Typo == "Cargo") { StatusPlayer.CurrentCargo = equipping as Cargo; } else if (Typo == "Rocket") { StatusPlayer.CurrentRocket = equipping as Rocket; } StatusPlayer.CurrentEquips.Add(equipping); clearSlot(); OpenSection(Risto); print("Equipado: " + equipping.Name); StatusPlayer.atualizeStats(); }