Beispiel #1
0
 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);
 }
Beispiel #2
0
        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
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
 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);
     }
 }
Beispiel #5
0
 public virtual void AgainstDefend(ActDefend defend)
 {
     Debug.Assert(false);
     Debug.LogError("Action: AgainstDefend() not implemented");
 }