public void SkillIsNotReference() { Skill p = SkillIndex.getSkillByName("Ship-wise"); Skill q = SkillIndex.getSkillByName("Ship-wise"); Assert.IsNotNull(p); Assert.IsNotNull(q); Assert.AreNotSame(p, q); }
public void SkillFetchByName() { Skill p = SkillIndex.getSkillByName("Ship-wise"); Assert.IsNotNull(p); Skill q = SkillIndex.getSkillByName("Schtroumpfed-wise"); Assert.IsNull(q); }
public void Init(int idx, string idxName, UIAtlas atlas) { this.skillIndex = idx + SkillIndex._1st; this.skillFrame.spriteName = "Hero_skill_frame"; SysSkillMainVo skillData = SkillUtility.GetSkillData(idxName, -1, -1); this.skillPic.atlas = atlas; this.skillPic.spriteName = skillData.skill_icon; UIEventListener.Get(this.skillFrame.gameObject).onMobileHover = new UIEventListener.BoolDelegate(this.CheckState); }
public Skill this[SkillIndex index] { get { return(this[(int)index]); } private set { this[(int)index] = value; } }
public override bool Equals(object obj) { SkillIndex s = (SkillIndex)obj; if (mSkillId == s.mSkillId && mSkillLevel == s.mSkillLevel) { return(true); } return(base.Equals(obj)); }
private Player GetPlayerFromSave(Dictionary <string, string> saveValues) { var id = int.Parse(saveValues.GetValue("Id")); var name = saveValues.GetValue("Name"); var level = int.Parse(saveValues.GetValue("Level")); var xp = int.Parse(saveValues.GetValue("XP")); var baseHealth = int.Parse(saveValues.GetValue("BaseHealth")); var combatStyle = (CombatStyle)Enum.Parse(typeof(CombatStyle), saveValues.GetValue("CombatStyle")); var health = int.Parse(saveValues.GetValue("Health")); var gold = int.Parse(saveValues.GetValue("Gold")); var location = (PlayableZone)Enum.Parse(typeof(PlayableZone), saveValues.GetValue("CurrentZone")); var inventoryStr = saveValues.GetValue("Inventory"); var itemIds = inventoryStr.Split(',').Where(s => s != ""); var inventory = new List <Item>(); foreach (var itemId in itemIds) { inventory.Add(ItemIndex.GetItemById(int.Parse(itemId))); } var skillsStr = saveValues.GetValue("Skills"); var skillIds = skillsStr.Split(',').Where(s => s != ""); var skills = new List <Skill>(); foreach (var skillId in skillIds) { skills.Add(SkillIndex.GetSkillbyId(int.Parse(skillId))); } return(new Player(id, name, level, xp, baseHealth, health, 2, inventory, skills) { CombatStyle = combatStyle, CurrentZone = location }); }
public void UnfreezeSkill(SkillIndex index) { UnfreezeSkill((int)index); }
public void FreezeSkill(SkillIndex index) { FreezeSkill((int)index); }
public ActivationStatus GetStatus(SkillIndex index) { return(GetStatus((int)index)); }