public static string GetNameLocalise(this Executable.ExecatableUseType useType) { string res = LocalizedStrings.missing_string; switch (useType) { case Executable.ExecatableUseType.CLICK: res = LocalizedStrings.executable_use_type_click; break; case Executable.ExecatableUseType.DRAG_DROP_PLASE: res = LocalizedStrings.executable_use_type_drag_drop_place; break; case Executable.ExecatableUseType.DRAG_DIRECTION: res = LocalizedStrings.executable_use_type_drag_direction; break; } return(res); }
private void Initiate() { if (typeOfSkill == Type.SKILL) { switch (skillNum) { case SkillNum.FIRS: currentSkill = playerInventory.FirstSkill; break; case SkillNum.SECOND: currentSkill = playerInventory.SecondSkill; break; } if (currentSkill.Skill != null) { img.sprite = currentSkill.Skill.MainPropertie.Icon; useType = currentSkill.Skill.UseType; } } else { switch (skillNum) { case SkillNum.FIRS: currentConsumable = playerInventory.FirstConsumable; break; case SkillNum.SECOND: currentConsumable = playerInventory.SecondConsumable; break; } if (currentConsumable.Consumable != null) { useType = currentConsumable.Consumable.UseType; img.sprite = currentConsumable.Consumable.MainPropertie.Icon; currentConsumable.Consumable.CallbackUsedCount += DecrementUsedConsumableCount; } } if ((currentSkill != null && currentSkill.Skill == null) || (currentConsumable != null && currentConsumable.Consumable == null)) { Destroy(cell); return; } else { if (typeOfSkill == Type.CONSUMABLE) { if (currentConsumable.Count < 0) { countText.enabled = false; } else { countText.text = currentConsumable.Count.ToString(StringFormats.intNumber); } } else { countText.enabled = false; } } }