public override void DoAttack() { var quantityOfRunas = Random.Range(2, MaxPower); var selectedRunas = new List <Runa>(); for (int i = 0; i < quantityOfRunas; i++) { selectedRunas.Add(new Runa { Element = EnumElement.Fire, Selected = true, PoweredUp = false }); } ISpell spell = SpellFactory.Create(EnumElement.Fire, null, selectedRunas, this, Target, AttributePoints); spell.Execute(); }
private void onFinishSelection(List <Runa> selectedRunas) { ISpell spell = SpellFactory.Create(selectedRunas[0].Element, ComboStone.Element, selectedRunas, Player, Boss, Player.AttributePoints); if (spell != null) { spell.Execute(); } if (ComboStone.Element == null) { ComboStone.SetElement(selectedRunas[0].Element); } else { ComboStone.SetElement(null); } }
// Update is called once per frame void Update() { foreach (Hand hand in Player.instance.hands) { try { ISpell spell = hand.hoveringInteractable.gameObject.GetComponent <ISpell>(); if (hand.GetGrabStarting() != GrabTypes.None) { spell.Prepare(); } else if (hand.GetGrabEnding() != GrabTypes.None) { spell.Execute(); runeParticles.Stop(); runeParticles.Play(); } } catch (System.Exception) { Debug.Log("no spell active"); } } }
private Attack ExecuteNoGcd(ISpell spell) { return(spell.Execute(this)); }