private void Set(Avatar myAva, Avatar otherAva) { this.poActAttack = new ActAttack(myAva, otherAva); this.poActSuperAttack = new ActAttack(myAva, otherAva); this.poActCharge = new ActCharge(myAva, otherAva); this.poActDefend = new ActDefend(myAva, otherAva); }
public override void AgainstDefend(ActDefend defend) { Debug.LogError("Equal - Defend!"); this.pMyPlayerAnim.GetComponent <Animator>().SetTrigger("Defend"); this.pOtherAnim.GetComponent <Animator>().SetTrigger("Defend"); // Nothing for now }
public override void AgainstDefend(ActDefend defend) { Debug.LogError("Charge succeed!"); this.pMyPlayerAnim.GetComponent <Animator>().SetTrigger("Charge"); this.pOtherAnim.GetComponent <Animator>().SetTrigger("Defend"); this.pMyAvatar.GatherSP(); }
public override void AgainstDefend(ActDefend defend) { if (power == 1) { Debug.LogError("Attack failed!"); this.pMyPlayerAnim.GetComponent <Animator>().SetTrigger("Attack"); this.pOtherAnim.GetComponent <Animator>().SetTrigger("Defend"); // Attack failed! this.pMyAvatar.ConsumeSP(1); } else { Debug.LogError("SuperAttack succed!"); this.pMyPlayerAnim.GetComponent <Animator>().SetTrigger("SuperAttack"); this.pOtherAnim.GetComponent <Animator>().SetTrigger("DefendFail"); // Attack failed! this.pMyAvatar.ConsumeSP(3); pOtherAvatar.TakeDamage(1); } }
public virtual void AgainstDefend(ActDefend defend) { Debug.Assert(false); Debug.LogError("Action: AgainstDefend() not implemented"); }