Пример #1
0
    public void CollectCube(Blocks.Cube cube)
    {
        if (cube == null)
        {
            return;
        }

        if (_cubes.Remove(cube))
        {
            _collectedCubeCount++;
            var newScale = new Vector3(1f, (float )_collectedCubeCount / _cubeCount, 1f);

            foreach (var objective in _objectives)
            {
                objective.innerCube.localScale = newScale;
            }
        }
    }
Пример #2
0
 public void AddCube(Blocks.Cube cube)
 {
     _cubes.Add(cube);
     _cubeCount++;
 }