Ejemplo n.º 1
0
    LevelScript level;                        //instantiate Level type and as a reference

    private void Start()
    {
        level = FindObjectOfType <LevelScript>(); //assign level to be a level type

        if (tag == "Breakable")                   //only count blocks we can break
        {
            level.CountLevelBlocks();             //+1 to the number of breakable blocks //every block instance has this script so it should correctly count the number of blocks we can break in a level
        }
    }