public Teleport(int id, Vector3 coordinates, int dimension, Misc.OnEnterCheckpointDelegate enterDelegate, List <TeleportDestination> exits) : base(coordinates, enterDelegate, dimension) { this.id = id; this.exits = new List <TeleportDestination>(); exits.ForEach(x => this.exits.Add(x)); // Throw custom exception if there is no exits for teleport // Because every teleport has to have at least 1 exit }
public Teleport(int id, Vector3 coordinates, int dimension, Misc.OnEnterCheckpointDelegate enterDelegate, List <TeleportDestination> exits) : base(coordinates, enterDelegate, dimension) { this.id = id; this.exits = new List <TeleportDestination>(); exits.ForEach(x => this.exits.Add(x)); }