Slightly Coded – Potbellied King – Dev. Post 2
|
Did a bit of work today, actually not alot but it still managed to be quite helpful. The first thing I had to do was to make it so that the thrown food in the game changes sprite depending on the type of food that is thrown. To do this I used the following code: SpriteRenderer l_xRend = this.gameObject.GetComponent(); I just discovered that I can’t copy-paste from unity for whatever reason, whenever I try it just ends up being weird characters, maybe there’s something wrong with my languague options. Whatever, I’ll worry about that when I have to show an example of 50 rows of code or something… The other thing I did is that I set the player to have a limit of how much he may lean in either direction (that is, the actual physical player who’s playing the game). The method works in theory but is going to need quite a bit of balancing to get right but that’s more of a game design question. I’d like to give an example but as stated above I can’t seem to copy-paste from unity and I’m not very fond of writing 50+ rows of example code just like that. David, the fellow coder and Producer of the group looked into making a main menu of some sort (probably something involving a State Manager), I will take a good look at that tomorrow since I am already done with this week’s other goals. Seriously, unity makes it a little bit too easy sometimes, but I guess I shouldn’t complain, I have a feeling that things are going to get a little bit more complicated from now on. ♪ |