Пример #1
0
        private void SpawnEnemy()
        {
            var enemy = ActorFactory.CreateEnemy();

            _enemies.Add(enemy.GetComponent <EnemyController>());
            enemy.Transform.Parent   = Transform;
            enemy.Transform.Position = new Vector2(_random.Next((int)_zone.X), _random.Next((int)_zone.Y));
            Instatiate(enemy);
        }