Ejemplo n.º 1
0
    public override void _Ready()
    {
        manager    = (GameManager)GetNode("GameManager");
        canvas     = (CanvasLayer)GetNode("CanvasLayer");
        menuBox    = (VBoxContainer)canvas.GetNode("VBoxContainer");
        levelsGrid = (GridContainer)canvas.GetNode("GridContainer");
        playButton = (Button)menuBox.GetNode("ButtonPlayer");

        if (manager.currentlevel != 0)
        {
            playButton.Text = "Continue";
        }

        manager.updateData();
        levelSelector = (LevelSelector)levelsGrid;
        levelSelector.EnableUpTo(manager.maxLevel);
    }