Beispiel #1
0
 void Death()
 {
     if (ctrlType == CtrlType.player)
     {
         if (isLive == true)
         {
             controller.enabled  = false;
             thirdPerson.enabled = false;
             anim.SetTrigger("Death");
             anim.ResetTrigger("Live");
             isLive = false;
             if (GameMgr.instance.camp == 1)
             {
                 sb.AddCamp2();
             }
             else
             {
                 sb.AddCamp1();
             }
             StartCoroutine(ReLive());
         }
     }
     else if (ctrlType == CtrlType.net)
     {
         if (isLive == true)
         {
             anim.SetTrigger("Death");
             anim.ResetTrigger("Live");
             isLive = false;
             if (gameObject.GetComponent <BattlePlayer>().camp == 1)
             {
                 sb.AddCamp2();
             }
             else
             {
                 sb.AddCamp1();
             }
             StartCoroutine(ReLive());
         }
     }
 }