public override void OnEpisodeBegin()
 {
     SceneObjectSpawner.Reset();
     ThisRigidbody.velocity = Vector3.zero;
     transform.position     = new Vector3(0, 2, 0);
     transform.rotation     = Quaternion.Euler(Vector3.zero);
 }
Example #2
0
    IEnumerator DelayedReset()
    {
        yield return(new WaitForSeconds(resetDelay));

        RB.velocity        = new Vector3(0, 0, 0);
        transform.position = startPosition;
        gameOver           = false;
        hasStarted         = false;
        GC.resetGameSession();
        GC.SwitchToMenuCanvas();
        spawner.Reset();
        StartCoroutine(spawner.SpawnPlatforms());
    }