Example #1
0
        public override bool OnMouseMove(Surface s, Model m, Point square, Point offset, MouseButtons mb)
        {
            if (selected != null && mb == MouseButtons.Left)
            {
                selected.Position = square.SquareToCenter();
                if (Ui.Visible) Ui.SetActor(selected);	// refresh the view in the property editor
                return true;
            }

            return false;
        }
Example #2
0
 public static Goal WalkTo(Point p)
 {
     return new Goal("Walk",
         a => { if (a.Position == p.SquareToCenter()) a.PopGoal(); },
         a => a.SetOrders(a.PlanPathTo(p)));
 }