public float speed
float x = Input.GetAxisRaw(''Horizontal'');
float y = Input.GetAxisRaw(''Vertical'');
Vector2 direction = new Vector2(x,y);
transform.Translate(direction*speed*Time.deltaTime);
public float speed
float x = Input.GetAxisRaw(''Horizontal'');
float y = Input.GetAxisRaw(''Vertical'');
Vector2 direction = new Vector2(x,y);
transform.Translate(direction*speed*Time.deltaTime);