Ejemplo n.º 1
0
    private void PopulateTree()
    {
        //Transfer Root
        abilityTree.AddRoot(ScriptableObject.CreateInstance <Ab_Transfer>());

        //Melee Abilities
        abilityTree.Add(ScriptableObject.CreateInstance <Ab_Melee>(), Branch.LEFT, 1);
        abilityTree.Add(ScriptableObject.CreateInstance <Ab_NanoSword>(), Branch.LEFT, AbilityType.COMBAT, 2);
        abilityTree.Add(ScriptableObject.CreateInstance <Ab_Passive_AttackRate>(), Branch.LEFT, AbilityType.COMBAT, 4);
        //abilityTree.Add(ScriptableObject.CreateInstance<Ab_Ultimate_Carbon_Copy>(), Branch.LEFT, AbilityType.COMBAT, 8);

        abilityTree.Add(ScriptableObject.CreateInstance <Ab_Passive_Bleed>(), Branch.MIDDLE, AbilityType.COMBAT, 6);
        //abilityTree.Add(ScriptableObject.CreateInstance<Ab_Passive_Heal>(), Branch.MIDDLE, AbilityType.COMBAT, 7);
        //abilityTree.Add(ScriptableObject.CreateInstance<Ab_Ultimate_Siphon>(), Branch.MIDDLE, AbilityType.COMBAT, 9);

        // abilityTree.Add(ScriptableObject.CreateInstance<Ab_CriticalStrike>(), Branch.RIGHT, AbilityType.COMBAT, 3);
        abilityTree.Add(ScriptableObject.CreateInstance <Ab_Passive_AttackDamage>(), Branch.RIGHT, AbilityType.COMBAT, 5);
        //abilityTree.Add(ScriptableObject.CreateInstance<Ab_Ultimate_Overpower>(), Branch.RIGHT, AbilityType.COMBAT, 10);


        //Transfer Abilities


        //Environmental Abilities


        //Sanity Check
        //abilityTree.PrintTree();
    }
Ejemplo n.º 2
0
 private void AddRight(Ability a, int description = -1)
 {
     if (RightBranch == null)
     {
         RightBranch = new AbilityTree(a, root, description);
     }
     else
     {
         RightBranch.Add(a, Branch.RIGHT, description);
     }
 }
Ejemplo n.º 3
0
 private void AddMiddle(Ability a, int description = -1)
 {
     if (MiddleBranch == null)
     {
         MiddleBranch = new AbilityTree(a, root, description);
     }
     else
     {
         MiddleBranch.Add(a, Branch.MIDDLE, description);
     }
 }
Ejemplo n.º 4
0
 private void AddLeft(Ability a, int description = -1)
 {
     if (LeftBranch == null)
     {
         LeftBranch = new AbilityTree(a, root, description);
     }
     else
     {
         LeftBranch.Add(a, Branch.LEFT, description);
     }
 }