Ejemplo n.º 1
0
 void Start()
 {
     Lives         = 3;
     firstPosition = new Vector2(-2.47f, 4.4f);
     swapper.ToggleObjectsColor(ColorNames.Green);
     inAnimation = true;
     StartCoroutine(StartInitialAnimation(Vector2.zero));
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (!isChanging)
        {
            return;
        }

        if (_timer > 0)
        {
            _timer -= Time.deltaTime;
        }
        else
        {
            if (colorEnum.MoveNext() && pointEnum.MoveNext())
            {
                swapper.ToggleObjectsColor(colorEnum.Current);
                Score  = pointEnum.Current;
                _timer = timer;
            }
            else
            {
                _timer = 0;
            }
        }
    }
Ejemplo n.º 3
0
    void Awake()
    {
        EventList.playerDeath += Grub_OnPlayerDeath;
        EventList.waveChanged += Grub_OnWaveChanged;

        swapper = GetComponent <ColorSwapper>();
        swapper.ToggleObjectsColor(ColorNames.White);
        Score     = 500;
        _timer    = timer;
        colorEnum = colors.GetEnumerator();
        pointEnum = points.GetEnumerator();
    }