Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (coldTime >= 1 && collision.gameObject.tag == "Player")
     {
         LHNetworkPlayer player  = collision.GetComponent <LHNetworkPlayer>();
         EnegySprite     _eSprit = player.GetEnegySprite();
         if (_eSprit)
         {
             _eSprit.OnSelfDestory();
             manager.OnUseEnegy(player);
             coldTime = 0;
         }
     }
 }
Exemple #2
0
 public void ResetPlayer()
 {
     manager.ui_countdown.gameObject.SetActive(true);
     manager.ui_countdown.SetCountDownDown(3, manager.ui_select);
     _wasInit           = false;
     _data              = null;
     transform.position = new Vector3(0, 0, 0);
     GameObject.Destroy(hero);
     transform.eulerAngles = new Vector3(0, 0, 0);
     controller.enabled    = false;
     controller.InitDone   = false;
     GetComponent <Rigidbody2D>().Sleep();
     infoCanva.OnSetPlayerName("");
     if (_carrySprite)
     {
         manager.RemoveSprite(_carrySprite);
         _carrySprite.OnSelfDestory();
     }
 }