TalentBtnStatsInfo FindStatsInfo(EPlayerSpells spell) { foreach (var knInfoPair in statsInfo) { if (knInfoPair.spell == spell) { return(knInfoPair.btnInfo); } } return(null); }
// sets local and global cooldown static public void UseSpell(EPlayerSpells spell) { if (zeroPenalty == true) // allows a spell to not cost any penalty { zeroPenalty = false; return; } Talent talent = talents[spell]; talent.CurrentPenalty = talent.levelDef[talent.UpgradedTalentLevel].localCooldown; SetGlobalCooldown(talent.levelDef[talent.UpgradedTalentLevel].globalCooldown); }
public void UseSpell(EPlayerSpells spell) { TalentsHolderMgr.UseSpell(spell); switch (spell) { case EPlayerSpells.eKnightMoveUp: case EPlayerSpells.eKnightMoveDown: case EPlayerSpells.eKnightMoveLeft: case EPlayerSpells.eKnightMoveRight: knightMove.Activate(spell); break; case EPlayerSpells.eKnightInnerStrength: knightIS.Activate(); break; case EPlayerSpells.eKnightSoulLink: knightSL.Activate(); break; case EPlayerSpells.eBishopWithholdEnemy: case EPlayerSpells.eBishopEntangle: case EPlayerSpells.eBishopFreeze: case EPlayerSpells.eBishopInstantDeath: bishopPickEnemySpells.Activate(spell); break; case EPlayerSpells.eBishopPushUp: case EPlayerSpells.eBishopPushDown: case EPlayerSpells.eBishopPushLeft: case EPlayerSpells.eBishopPushRight: bishopPushEnemySpell.Activate(spell); break; case EPlayerSpells.eBishopThornTrap: bishopThornTrapSpell.Activate(); break; case EPlayerSpells.eBishopClearTrap: bishopThornTrapSpell.ClearThornTrap(); break; } }
public GameObject moveObject; // knight public void Activate(EPlayerSpells spell) { switch (spell) { case EPlayerSpells.eKnightMoveDown: MoveDown(); break; case EPlayerSpells.eKnightMoveUp: MoveUp(); break; case EPlayerSpells.eKnightMoveLeft: MoveLeft(); break; case EPlayerSpells.eKnightMoveRight: MoveRight(); break; } }
public void ClickSpell(EPlayerSpells spell) { talentButtons[spell].OnClick(); }
public void Activate(EPlayerSpells spell) { bActivated = true; m_playerSpell = spell; }
static public Talent GetTalent(EPlayerSpells spell) { return(talents[spell]); }
static public void DowngradeSpell(EPlayerSpells spell, int level) { talents[spell].UpgradedTalentLevel -= level; }