Esempio n. 1
0
    private void Awake()
    {
        gameState = GameObject.FindWithTag("GameState").GetComponent <GameState>();

        meter_start = GameObject.FindWithTag("StartingArea").GetComponent <Meter_Start>();

        odometer = GameObject.FindWithTag("ScoreCanvas").GetComponent <Odometer>();

        deathScreen = GameObject.FindWithTag("DeathScreen").GetComponent <DeathScreen>();

        SpawnPoint       = new Vector3(-4.77f, -2.365f, 0f);
        CameraResetPoint = new Vector3(1.17f, 1.19f, -1f);
    }
Esempio n. 2
0
    void Start()
    {
        player = GameObject.FindWithTag("Player");
        meter  = GameObject.Find("Starting_Area");


        player_control = player.GetComponent <Player_control>();

        player_velo = player.GetComponent <Rigidbody2D>();

        meter_start = meter.GetComponent <Meter_Start>();


        totalDistance = GameObject.FindWithTag("TotalDistance").GetComponent <TMPro.TextMeshProUGUI>();

        lastPosition = new Vector3(player.transform.position.x, 0, 0);
    }