public string GetValidName(VehicleComponentType type) { string name = type.ToString() + " "; switch (type) { case VehicleComponentType.Body: { name += (Bodies.Count + 1).ToString(); } break; case VehicleComponentType.Spring: { name += (Springs.Count + 1).ToString(); } break; case VehicleComponentType.Damper: { name += (Dampers.Count + 1).ToString(); } break; default: break; } return(name); }
public VehicleComponentSeed(VehicleComponentSeed other) { this.id = other.id; this.localPosition = other.localPosition; this.localRotation = other.localRotation; this.type = other.type; }
private VehicleComponent AddChild(VehicleComponentType type, uint id) { switch (type) { case VehicleComponentType.CoreBlock: return(AddChild(Prefabs.CoreBlock, id)); case VehicleComponentType.AttachableBlock: return(AddChild(Prefabs.AttachableBlock, id)); case VehicleComponentType.Wheel: return(AddChild(Prefabs.Wheel, id)); case VehicleComponentType.Booster: return(AddChild(Prefabs.Booster, id)); case VehicleComponentType.BlockDLC: { var dlc = DLCManager.PatchDayOne; if (!dlc.IsLoaded) { throw new Exception("Missing DLC"); } return(AddChild(dlc.Block, id)); } default: Debug.LogError("Invalid type"); break; } return(null); }
public VehicleComponentSeed() { this.type = Type; }
private VehicleComponent AddChild(VehicleComponentType type) { return(AddChild(type, GenerateID())); }