// set fields for skills public void SetSkillStats(CustomSkill template) { if (ResourcesPrefabManager.Instance.GetItemPrefab(template.New_ItemID) is Skill skill) { skill.Cooldown = template.Cooldown; skill.ManaCost = template.ManaCost; skill.StaminaCost = template.StaminaCost; // set skill tree icon if (!string.IsNullOrEmpty(template.SkillTreeIconName) && SL.Instance.TextureData.ContainsKey(template.SkillTreeIconName)) { CustomSkills.SetSkillSmallIcon(template.New_ItemID, template.SkillTreeIconName); } } }
internal void Awake() { Instance = this; }