private void FixedUpdate()
 {
     playerGO = GameObject.FindWithTag("Player") ? GameObject.FindWithTag("Player").GetComponent <Moviment>() : null;
     if (playerGO == null)
     {
         return;
     }
     if (isDead())
     {
         if (playerGO.cant_move)
         {
             playerGO.jump();
             playerGO.gameObject.GetComponent <CapsuleCollider2D>().isTrigger = true;
             playerGO.gameObject.tag = "Dead";
             CoreController.Instance().gameController.justDied();
             playerGO.cant_move = false;
         }
     }
 }
Exemple #2
0
 public void mainMenu()
 {
     CoreController.Instance().gameController.mainMenu();
 }
 public void restart()
 {
     CoreController.Instance().gameController.startGame();
 }
Exemple #4
0
 // Update is called once per frame
 void Update()
 {
     gameObject.GetComponent <Text>().text = CoreController.Instance().playerController.player.point.ToString();
 }