コード例 #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);
 }
コード例 #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
        }
コード例 #3
0
ファイル: ActCharge.cs プロジェクト: DirtyWine/BBZ-Qi
        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();
        }
コード例 #4
0
ファイル: ActAttack.cs プロジェクト: DirtyWine/BBZ-Qi
 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);
     }
 }
コード例 #5
0
 public virtual void AgainstDefend(ActDefend defend)
 {
     Debug.Assert(false);
     Debug.LogError("Action: AgainstDefend() not implemented");
 }