コード例 #1
0
 private void GeneratePrimaryPathSelections()//Primary Path Selectors are not destroyed
 {
     for (int i = 0; i < 5; i++)
     {
         GameObject        gO  = GameObjectUtility.CustomInstantiate(pathSelectionButton, transform);
         RunePathSelection rpS = gO.GetComponent <RunePathSelection>();
         rpS.Initialize(strPathNames[i], this, runePage, isPrimary);
     }
 }
コード例 #2
0
 private void GenerateSecondaryPathSelections(string primaryPathSelected)
 {   //Secondary Path Selectors are destroyed and regenerated when a new primary path is selected
     secPathSelections = new List <GameObject>();
     if (primaryPathSelected == "")
     {
         Debug.LogError("Error when Generating Secondary path: No primary path selected");
         throw new System.Exception("Error when Generating Secondary path: No primary path selected");
     }
     for (int i = 0; i < 5; i++)
     {
         if (primaryPathSelected.Equals(strPathNames[i]))
         {
             continue;
         }
         GameObject gO = GameObjectUtility.CustomInstantiate(pathSelectionButton, transform);
         secPathSelections.Add(gO);
         RunePathSelection rpS = gO.GetComponent <RunePathSelection>();
         rpS.Initialize(strPathNames[i], this, runePage, isPrimary);
     }
 }