public void Initialize(ASkill skill) { Skill = skill; Thumbnail = skill.Thumbnail; Name = skill.Name; TypeOfSkillToHouse = skill.Tag; }
public static ASkill GetSkill(SkillType p_skillType, params object[] p_parameters) { ASkill skill = null; switch (p_skillType) { case SkillType.HitSingleCharacter: Assert.IsTrue(p_parameters.Length == 2); skill = new HitSingleCharacterSkill((GameObject)p_parameters[0], (int)p_parameters[1]); break; case SkillType.HealSingleCharacter: Assert.IsTrue(p_parameters.Length == 3); skill = new HealSingleCharacterSkill((GameObject)p_parameters[0], (float)p_parameters[1], (float)p_parameters[2]); break; default: Debug.Log("The type " + p_skillType.ToString() + " is not implemented."); break; } return(skill); }
public void InvokeEvent(ASkill SelectedSkill) { if (_SkillSelectEvent != null) { _SkillSelectEvent.Invoke(SelectedSkill); } }
public InteractionSkill(AInteraction p_interaction, ASkill p_skill) : base("[Interaction] " + p_skill.Name, p_skill?.Owner, 0f) { _interaction = p_interaction; _interaction.OnInteractionDone += OnInteractionDone; _interaction.OnInteractionCancelled += OnInteractionCancelled; _skill = p_skill; }
private void Start() { // Storing the reference to the skill _Skill = _UISlotData.Skill; _CoolDownBar = GetComponentInChildren <Slider>(); _Name = GetComponentInChildren <Text>(); _Name.text = _Skill.Name; }
private void Btn_slot_cheat_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(targetFile)) { return; } if (!targetFileType.Is(typeof(Armor), typeof(ASkill), typeof(IWeapon))) { return; } foreach (var item in items) { switch (item) { case ISlots _: { item.Slot_Count = 3; item.Slot_1_Size = 4; item.Slot_2_Size = 4; item.Slot_3_Size = 4; break; } case ASkill _: { ASkill aSkill = item; aSkill.Deco_Count = 2; aSkill.Deco_Lvl_1 = 4; aSkill.Deco_Lvl_2 = 4; break; } } } }
/// <summary> /// Adds to game skill.给系统添加技能 /// </summary> /// <param name="skill">Skill.</param> public void AddToGameSkill (ASkill skill) { gameSkills.Add (skill); }