Unity3D code for a simple game