private void OnSkillCooldownStart(ESkillKey skillKey, float duration) { if (skillKey == _skillKey) { _cooldown.StartCooldown(duration); } }
public void UseSkill(ESkillKey skillKey) { if (FightManager.SceneInstance.Status == EFightStatus.InProgress && _skills.ContainsKey(skillKey) && _skills[skillKey] != null) { _skills[skillKey].Use(this); } }
public void SetSkillIndex(EUnitKey heroKey, ESkillKey skillKey, int index) { List<ESkillKey> heroSkills = GetHeroSkillsInternal(heroKey); if (index < 0 || index >= heroSkills.Count) { return; } if (heroSkills.IndexOf(skillKey) != -1 && heroSkills.IndexOf(skillKey) != index) { heroSkills.Remove(skillKey); heroSkills.Insert(index, skillKey); } }
public void AddSkill(EUnitKey heroKey, ESkillKey skillKey) { List<ESkillKey> heroSkills = GetHeroSkillsInternal(heroKey); if (heroSkills.Count >= _maxSkillsAmount) { return; } if (heroSkills.IndexOf(skillKey) != -1) { return; } heroSkills.Add(skillKey); }
public SkillParameters GetSkillParameters(ESkillKey skillKey) { for (int i = 0; i < _skillsData.Length; i++) { if (_skillsData[i].Key == skillKey) { return(_skillsData[i]); } } return(null); }
public override void PlaySkillAnimation(ESkillKey skillKey, params object[] data) { switch (skillKey) { case ESkillKey.ClipDischarge: PlaySkillClipDischargeAnimation((float)data[0]); break; case ESkillKey.ExplosiveCharges: PlaySkillExplosiveChargesAnimation(); break; case ESkillKey.StunGrenade: PlaySkillStunGrenadeAnimation(); break; } }
public void AddSkill(EUnitKey heroKey, ESkillKey skillKey) { List <ESkillKey> heroSkills = GetHeroSkillsInternal(heroKey); if (heroSkills.Count >= _maxSkillsAmount) { return; } if (heroSkills.IndexOf(skillKey) != -1) { return; } heroSkills.Add(skillKey); }
public void SetSkillIndex(EUnitKey heroKey, ESkillKey skillKey, int index) { List <ESkillKey> heroSkills = GetHeroSkillsInternal(heroKey); if (index < 0 || index >= heroSkills.Count) { return; } if (heroSkills.IndexOf(skillKey) != -1 && heroSkills.IndexOf(skillKey) != index) { heroSkills.Remove(skillKey); heroSkills.Insert(index, skillKey); } }
public void Setup(SkillParameters skillParams) { _skillKey = skillParams.Key; _aggroCost = skillParams.AggroCrystalsCost; if (!skillParams.IconPath.Equals(string.Empty)) { Sprite skillSprite = UIResourcesManager.Instance.GetResource<Sprite>(string.Format("{0}/{1}", GameConstants.Paths.UI_ABILITY_ICONS_RESOURCES, skillParams.IconPath)); if (skillSprite != null) { _imgAbilitiIcon.sprite = skillSprite; _imgAbilitiIcon.gameObject.SetActive(true); } } if (_txtAbilityCost != null) { _txtAbilityCost.text = _aggroCost.ToString(); } }
public void Setup(SkillParameters skillParams) { _skillKey = skillParams.Key; _aggroCost = skillParams.AggroCrystalsCost; if (!skillParams.IconPath.Equals(string.Empty)) { Sprite skillSprite = UIResourcesManager.Instance.GetResource <Sprite>(string.Format("{0}/{1}", GameConstants.Paths.UI_ABILITY_ICONS_RESOURCES, skillParams.IconPath)); if (skillSprite != null) { _imgAbilitiIcon.sprite = skillSprite; _imgAbilitiIcon.gameObject.SetActive(true); } } if (_txtAbilityCost != null) { _txtAbilityCost.text = _aggroCost.ToString(); } }
public void AddSkill(EUnitKey heroKey, ESkillKey skillKey, int index) { AddSkill(heroKey, skillKey); SetSkillIndex(heroKey, skillKey, index); }
public void RemoveSkill(EUnitKey heroKey, ESkillKey skillKey) { List <ESkillKey> heroSkills = GetHeroSkillsInternal(heroKey); heroSkills.Remove(skillKey); }
public void RemoveSkill(EUnitKey heroKey, ESkillKey skillKey) { List<ESkillKey> heroSkills = GetHeroSkillsInternal(heroKey); heroSkills.Remove(skillKey); }
public virtual void PlaySkillAnimation(ESkillKey skillKey, params object[] data) { }