Exemplo n.º 1
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
     if (FirstPerkId != 0)
     {
         //Debug.Log((UpgradeTree.GetPerk(FirstPerkId)).name);
         //Debug.Log(player.GetTree((UpgradeTree.GetPerk(FirstPerkId).skillType))); //.GroupPerks[0].ids[0]
         ThisPerk = Array.Find(player.GetTree((UpgradeTree.GetObject(FirstPerkId).Object as Perk).skillType).GroupPerks, x => x.ids[0] == FirstPerkId);
         if (ThisPerk != null)
         {
             lvl.text      = (ThisPerk.FocusedPerk.NeededLevelToLearn) + "lvl";
             PerkName.text = ThisPerk.FocusedPerk.name;
             //tree = transform.GetComponentInParent<UpgradeTree>();
         }
         //Debug.Log(ThisPerk);
         //ThisPerk = Array.Find(player.GetTree((UpgradeTree.GetObject(FirstPerkId).Object as Perk).skillType).GroupPerks, x => { uint k = Array.Find(x.ids, y => y == FirstPerkId); if (k != 0) Debug.Log("!@!"); return k != 0; });
     }
     //ThisPerk =
 }
Exemplo n.º 2
0
 public void ShowNeededLevelValue(GroupPerkClass group)
 {
     LeftInfo.text = "Необходимо : " + ((UpgradeTree.GetObject(group.ids[group.UpgradeLevel]).Object as Perk).NeededLevelToLearn);
 }