Esempio n. 1
0
 private SpawnPoint FindClearSpawnPoint(SpawnPointTypes type)
 {
     return(_config
            .SpawnPoints
            .Shuffle()
            .FirstOrDefault(sp => sp.Type == type && !AreVehiclesInRange(sp.Position, SpawnAreaClearanceRange)));
 }
        public static SpawnPoint Load(BinaryReader BR)
        {
            SpawnPointTypes SpawnPointType = (SpawnPointTypes)BR.ReadByte();

            switch (SpawnPointType)
            {
            case SpawnPointTypes.Player:
                return(new PlayerSpawnPoint(BR));

            case SpawnPointTypes.Vehicle:
                return(new VehicleSpawnPoint(BR));
            }

            return(null);
        }
Esempio n. 3
0
 public SpawnPoint(Vector3 position, double rotation, SpawnPointTypes type)
 {
     Type     = type;
     Position = position;
     Rotation = new Vector3(0, 0, rotation);
 }
 protected SpawnPoint(SpawnPointTypes SpawnPointType)
 {
     this.SpawnPointType = SpawnPointType;
 }