Game Development Reference
In-Depth Information
rent frame, and returns
false
otherwise. By using
if
keyword, we build conditional state-
ments that bind movement to certain direction by a specific key on the keyboard. Here we
use again
transform.Translate()
to move the object on x and y axes, and use positive and
negative values of
speed
to specify the movement direction.