Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Block Breaker

$
0
0

Hi everyone !!!

I have a question regarding the score part in udemy course “ Complete C# Unity Developer 2D: Learn to Code Making Games ” - BLOCK BREAKER

How can you keep the previous score of the previous level while pressing on PLAY AGAIN ??? 

I used this method in the SceneLoader.cs :

public void LoadPreviousScene()
    {
        int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
        SceneManager.LoadScene(currentSceneIndex - 1);
    }

Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>