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;
         }
     }
 }
Beispiel #2
0
 public void mainMenu()
 {
     CoreController.Instance().gameController.mainMenu();
 }
Beispiel #3
0
 public void restart()
 {
     CoreController.Instance().gameController.startGame();
 }
Beispiel #4
0
 // Update is called once per frame
 void Update()
 {
     gameObject.GetComponent <Text>().text = CoreController.Instance().playerController.player.point.ToString();
 }