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