Saturday, 15 February 2014

Game idea and some scripts...

I started improving m game idea and tried to make it more original. Being inspired by my favourite episodes of Doctor Who series, which included weeping angels statues(for future reference I will use statement "weeping angels" to talk about the idea behind it not the statues), I decided to implement something similar in my game. On the Internet I found already made script for "weeping angel", unfortunately it was in Javascript...(reference link to the script I found)
Weeping Angels from Doctor Who

I rather use C# in Unity therefore I rewrote parts that were specifically in Javascript-mainly declaring the variables. For some I had to figure out what type of variable it was myself as Javascript use type var for any variable whereas in C# I had to specify the type myself. It wasn't very difficult but tricky sometimes.

After this when i tried testing this script I got some errors after starting the game, it happened only because I forgot to set the initial position of a "weeping angel" and made the variable private, which was a big mistake.. But after I figured that out the script started working as it should be(I am not going to explain it exactly as hopefully most of people will play the game first and discover this themselves).

No comments:

Post a Comment