Unity Learn – 2D Roguelike – Writing Movement, Wall, Player and Enemy C# Scripts
Day 054 #100DaysOfCode
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/01/2020-01-12_2D-roguelike_moving-objects_code.png?resize=380%2C301&ssl=1)
I spent quite a bit of time working on the scripts for the 2D Roguelike project I am doing on Unity Learn.
It took a little while, but I definitely learned a lot more about programming for Unity.
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/01/2020-01-12_2D-roguelike_wall_code.png?resize=154%2C120&ssl=1)
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/01/2020-01-12_2D-roguelike_player_code.png?resize=158%2C147&ssl=1)
I was also held up by a couple of nasty bugs that kept my code from compiling. I couldn’t find the problems for the life of me!
Finally, I did find the errors. Wouldn’t you know it was simply a case of extra letters entered in where they didn’t belong? Ugh!
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/01/2020-01-12_2D-roguelike_enemy_code.png?resize=329%2C293&ssl=1)
That’s just the way it goes sometimes and thankfully my careful scrutiny of the code finally allowed me to see them and make the necessary fixes.