Exemple #1
0
 public void LeaveThePoolAndRun(Vector2 position)
 {
     IsInThePool             = false;
     _selfTransform.position = position;
     position.y += 0.2f;
     _spawnTimeViewer.SetPosition(position);
     _spawnTimeViewer.ShowValue(SpawnTime.ToString("0.00"));
     IsUsing = true;
     StartCoroutine(SpawnObjects());
 }
 private void UpdateSpawnTime()
 {
     if (spawnTime != spawnTimes [(int)objectType])
     {
         spawnTime = spawnTimes [(int)objectType];
         UpdateSpawnRate();
         // TODO: only do this when going from level 0 -> level 1
         if (timeSinceLastSpawned > 7)
         {
             timeSinceLastSpawned = 0;
         }
     }
 }