public static void MoveBackward(GameObject player) { // Works the same as above but x and y are flipped Vector2 dir = AIDirectionBehaviour.GetRotationVector(player); AIBasicBehaviour.GetController(player).playerController.playerMovement.MovePlayer(-dir.x, -dir.y); }
public static void MoveForward(GameObject player) { /* This method moves player forward but it does not * take care of the direction. To make the player run to the ball * use RunToTheBall method. */ Vector2 dir = AIDirectionBehaviour.GetRotationVector(player); AIBasicBehaviour.GetController(player).playerController.playerMovement.MovePlayer(dir.x, dir.y); }