Mario.CounterCheck C# (CSharp) Method

CounterCheck() public method

public CounterCheck ( ) : void
return void
    void CounterCheck()
    {
        if (counter == 1)
        {
            print("1");
            mario1.SetActive(false);
        }
        if (counter == 2)
        {
            mario2.SetActive(false);
        }
        if (counter == 3)
        {
            mario3.SetActive(false);
        }
        if (counter >= 4)
        {
            mario4.SetActive(false);
            Destroy(self);
        }
    }