Hello all! Just wanted to share a quick screenshot of what I’ve been working on. Most bugs are ironed out aside from the “NullReferenceException: Object reference not set to an instance of an object
ScoreDisplay.Update () (at Assets/Scripts/ScoreDisplay.cs:22)” which leads to “scoreText.text = gameSession.GetScore(tag).ToString();” under the update method in ScoreDisplay. It seems to be more of a performance issue than anything else, though since the game is so small scale it hasn’t affected anything yet. I found a way to take that bug out with the intention to increase performance, but I ended up with a much worse bug that actually stopped showing the total score on the game over screen. So I went with the lesser evil and stuck with the one the player wouldn’t notice. You may notice in the code above it says tag. To implement the multiplayer function without making a whole other Player2 class I just used tags and returned the tags in order to know which score (and health) text to update. If anyone is interested I can share more of the code. Here’s what it looks like. I’ll share a link to play the game after I put in a couple more features (such as switching between 1 and 2 players) and work on level design.
-Addy