public static string getFuelMass(GameObject vehicle) { try { FuelTank tank = vehicle.GetComponentInChildren <FuelTank>(); return(Math.Round(tank.GetMass(), 2).ToString()); } catch (Exception) { return("False"); } }
public float GetMass() { return(mass + engine_.GetMass() + fuelTank_.GetMass() + missile_.GetMass()); }
public float mass = 20; //Tons public float GetMass() { var perItem = mass + engine_.GetMass() + fuelTank_.GetMass(); return(count * perItem); }