コード例 #1
0
    public void CollectStars()
    {
        for(int i = 0; i < _starCollection.Count; i++)
        {
            _starCollection[i].Collect(transform);
        }

        _score.AddStars(_starCollection);

        if(_starCollection.Count > 0)
        {
            _timer.AddTime(_starCollection.Count + 2);
        }

        _totalCollected += _starCollection.Count;

        if(_totalCollected >= _starFactory.SpawnSettings.startingSpawn)
        {
            GameManager._instance.GameOver();
        }
        
        Clear();
    }