Пример #1
0
    private void OnStartRound(int player)
    {
        int rand = Random.Range(0, _powerUps.Length + 1);

        Debug.Log(rand);
        foreach (PowerUpPoint powerUp in _currentPowerUps)
        {
            if (powerUp.transform.position == _locations[rand].position)
            {
                OnStartRound(player);
                return;
            }
        }



        GameObject   newObject  = Instantiate(_powerUpObject, _locations[rand].position, Quaternion.identity);
        PowerUpPoint newPowerUp = newObject.GetComponent <PowerUpPoint>();

        newPowerUp.PowerUp = _powerUps[Random.Range(0, _powerUps.Length)];
        _currentPowerUps.Add(newPowerUp);
    }
Пример #2
0
 public void RemovePoint(PowerUpPoint point)
 {
     _currentPowerUps.Remove(point);
 }