Esempio n. 1
0
File: Arena.cs Progetto: exts/ld44
        private void SetupSpawnPointsInSpawner()
        {
            foreach (var corner in _spawnPoints.GetChildren().ToList())
            {
                if (!(corner is Node2D points))
                {
                    continue;
                }

                var list = new List <Vector2>();
                foreach (var point in points.GetChildren().ToList())
                {
                    if (point is Position2D position2D)
                    {
                        list.Add(position2D.GlobalPosition);
                    }
                }

                _spawner.AddSpawnPoints(list);
            }

            _spawner.RandomizeSpawnOrder();
        }