/// <summary> /// Initialization /// </summary> public override void _Ready() { //Intializing nodes sectionBL = new SectionBL(); studentScoreBL = new StudentScoreBL(); forwardBtn = GetNode <TextureButton>("ArrowNavigation/ForwardButton"); backWardBtn = GetNode <TextureButton>("ArrowNavigation/BackwardButton"); sectionLbl = GetNode <Label>("Title/SectionName"); level1 = GetNode <TextureButton>("Levels/Level1"); level2 = GetNode <TextureButton>("Levels/Level2"); level3 = GetNode <TextureButton>("Levels/Level3"); level4 = GetNode <TextureButton>("Levels/Level4"); level5 = GetNode <TextureButton>("Levels/Level5"); level6 = GetNode <TextureButton>("Levels/Level6"); bg = GetNode <Sprite>("Bg"); bgList = new List <string>(); bgList.Add("res://Assets/LevelUI/LvlMap03.png"); bgList.Add("res://Assets/LevelUI/LvlMap01.png"); bgList.Add("res://Assets/LevelUI/LvlMap02.png"); //On load set section id to 1 to display section 1 Global.SectionId = 1; sectionList = sectionBL.GetWorldSections(Global.WorldId); sectionLbl.Text = sectionList[count - 1].SectionName; //Star path string[] starArray = new string[3]; starArray[0] = "Level/1 stars.png"; starArray[1] = "Level/2 stars.png"; starArray[2] = "Level/3 stars.png"; //Disable forward n back btns if only have 1 level DisableBothButtons(); backWardBtn.Disabled = true; HideLevels(); DisplayLevelScore(); }