/// <summary> /// Creates the object's subtype. /// </summary> void CreateObjectSubtype() { // Set object type. switch (ObjectType) { // Pickupable. case ObjectSyncManager.ObjectTypes.Pickupable: syncedObject = new Pickupable(this.gameObject); break; // AI Vehicle. case ObjectSyncManager.ObjectTypes.AIVehicle: syncedObject = new AIVehicle(this.gameObject, this); break; // Boat. case ObjectSyncManager.ObjectTypes.Boat: syncedObject = new Boat(this.gameObject); break; // Garage door. case ObjectSyncManager.ObjectTypes.GarageDoor: syncedObject = new GarageDoor(this.gameObject); break; // Player vehicle. case ObjectSyncManager.ObjectTypes.PlayerVehicle: syncedObject = new PlayerVehicle(this.gameObject, this); break; } isSetup = true; }