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