I have this bundle of problems, I keep getting these errors.
These are my current errors;
This is the current script;
#pragma strict
var moveUp : KeyCode;
var moveDown : KeyCode;
var speed : float = 10;
function Update ()
{
if (Input.GetKey(moveUp))
(
rigidbody2D.velocity.y = speed;
)
else if (Input.GetKey(moveDown))
(
rigidbody2D.velocity.y = speed *-1;
)
else
(
rigidbody2D.velocity.y = 0;
)
}
I have been following Brackeys How to make a 2d game.
What’s the problem here?