コード例 #1
0
        protected override Movement GetMovement()
        {
            float horiz = Input.GetAxis("Horizontal");
            float vert  = Input.GetAxis("Vertical");

            return(MovementExtension.ToMovement(horiz, vert));
        }
コード例 #2
0
ファイル: WaypointCharacter.cs プロジェクト: danhanson/Update
        // 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));
        }
コード例 #3
0
 public override void OnAction(Character c)
 {
     FaceDirection(MovementExtension.ToMovement(c.Index - Index));
     base.OnAction(c);
 }