Ejemplo n.º 1
0
        public List <GameSpawn> GetGameSpawns()
        {
            GameSpawn[] spawnsCopy = new GameSpawn[_playerCount];
            _spawns.CopyTo(spawnsCopy, 0);

            _gen.Shuffle <GameSpawn>(spawnsCopy);

            return(new List <GameSpawn>(spawnsCopy));
        }
Ejemplo n.º 2
0
        public List<GameSpawn> GetGameSpawns()
        {
            GameSpawn[] spawnsCopy = new GameSpawn[_playerCount];
            _spawns.CopyTo(spawnsCopy, 0);

            _gen.Shuffle<GameSpawn>(spawnsCopy);

            return new List<GameSpawn>(spawnsCopy);
        }
Ejemplo n.º 3
0
        public FreeForAll()
        {
            double halfMapSize = _gameConfiguration.MapConfig.MAP_SIZE.Width * .5,
                   halfPI      = Math.PI / 2;

            _spawns[0] = new GameSpawn
            {
                StartVelocity = new Vector3(_gameConfiguration.CycleConfig.MAX_SPEED, 0, 0),
                StartPosition = new Vector3(-halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, -halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = Math.PI + halfPI,
                TrailColor    = 0xff0000
            };

            _spawns[1] = new GameSpawn
            {
                StartVelocity = new Vector3(0, 0, _gameConfiguration.CycleConfig.MAX_SPEED),
                StartPosition = new Vector3(halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, -halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = Math.PI,
                TrailColor    = 0x00ff00
            };


            _spawns[2] = new GameSpawn
            {
                StartVelocity = new Vector3(0, 0, -_gameConfiguration.CycleConfig.MAX_SPEED),
                StartPosition = new Vector3(-halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = 0,
                TrailColor    = 0x0000ff
            };

            _spawns[3] = new GameSpawn
            {
                StartVelocity = new Vector3(-_gameConfiguration.CycleConfig.MAX_SPEED, 0, 0),
                StartPosition = new Vector3(halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = halfPI,
                TrailColor    = 0xffff00
            };
        }
Ejemplo n.º 4
0
        public FreeForAll()
        {
            double halfMapSize = _gameConfiguration.MapConfig.MAP_SIZE.Width * .5,
                   halfPI = Math.PI / 2;

            _spawns[0] = new GameSpawn
            {
                StartVelocity = new Vector3(_gameConfiguration.CycleConfig.MAX_SPEED, 0, 0),
                StartPosition = new Vector3(-halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, -halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = Math.PI + halfPI,
                TrailColor = 0xff0000
            };

            _spawns[1] = new GameSpawn
            {
                StartVelocity = new Vector3(0, 0, _gameConfiguration.CycleConfig.MAX_SPEED),
                StartPosition = new Vector3(halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, -halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = Math.PI,
                TrailColor = 0x00ff00
            };

            _spawns[2] = new GameSpawn
            {
                StartVelocity = new Vector3(0, 0, -_gameConfiguration.CycleConfig.MAX_SPEED),
                StartPosition = new Vector3(-halfMapSize + _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = 0,
                TrailColor = 0x0000ff
            };

            _spawns[3] = new GameSpawn
            {
                StartVelocity = new Vector3(-_gameConfiguration.CycleConfig.MAX_SPEED, 0, 0),
                StartPosition = new Vector3(halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING, _gameConfiguration.CycleConfig.Y_OFFSET, halfMapSize - _gameConfiguration.MapConfig.MAP_START_PADDING),
                StartRotation = halfPI,
                TrailColor = 0xffff00
            };
        }