Classes and Constructors ! – Day 21 out of 120

Hey everyone ! The 100 day coding challenge is back ! And it has turned into a 120 day coding challenge because guess what ? I stopped doing my specific 1 hour a day of C# code with Unity !

Now don’t think I haven’t been coding for the past month ! I have made a whole 2D tower defense game from scratch that you can actually play on (which has made me progress a great GREAT deal) but I must say, I wasn’t very serious about my special coding hour, that helped me so much !

So I need to restart the challenge (which was coding 1 hour a day for 100 days IN A ROW). And I frankly don’t mind, all the better for me, I will learn more 🙂 !

So I started by watching some excellent tutorials on Youtube by Jonathan Weinberger on intermediate C# ! More specifically I had a look at C# classes and constructors, great tools to write less code but acheive the same results. I then used these new techniques to create an item script for a player character. Basically the item class would have a bunch of variables about the item (like damage, name, description) and then in my player script I would very quickly be able to create loads of different items with different stats !

Tomorow I will continue his course on intermediate C# and try the Unity course on creating a turn by turn rogue like game (which I attempted some time ago and found too hard) !

One more thing, my new game is already in the making, I am very exited about this one, it is… very different from the other 7 games I have made so far ! So stay tuned for more info about that exciting project !

Leave a Reply

Your email address will not be published. Required fields are marked *