protected override Movement GetMovement() { float horiz = Input.GetAxis("Horizontal"); float vert = Input.GetAxis("Vertical"); return(MovementExtension.ToMovement(horiz, vert)); }
// Update is called once per frame protected override Movement GetMovement() { Vector waypoint = waypoints [i]; if (Index.Equals(waypoint)) { if (++i == waypoints.Count) { i = 0; } waypoint = waypoints[i]; } return(MovementExtension.ToMovement(waypoint - Index)); }
public override void OnAction(Character c) { FaceDirection(MovementExtension.ToMovement(c.Index - Index)); base.OnAction(c); }