public void SpawnBadGuys()
 {
     for (int i = _enemyNumber; i > 0; i--)
     {
         var       point = _rand.Next(0, _enemyNumber);
         SpawnStar s     = (SpawnStar)Star.Instance();
         s.Position = _spawn.MapToWorld(_spawnPoints[point]) + _spawn.CellSize / 2;
         AddChild(s);
         _spawnPoints.Remove(_spawnPoints[point]);
     }
 }
Example #2
0
 private void Awake()
 {
     if (self == null)
     {
         self = this;
     }
     else if (self != this)
     {
         Destroy(gameObject);
     }
 }