Example #1
0
        void HandleTouchOnMap(object sender, MapClickedArgs args)
        {
            if (ClickHandler.WaitingForEntityClick)
            {
                return;
            }

            Map.Map.Position destination = args.ClickPosition;
            MoveComponent    comp        = (MoveComponent)Player.GetComponent(typeof(MoveComponent));

            comp.MoveEntity(destination, (bool success) => {
                if (!success)
                {
                    Console.WriteLine("Can't do that");
                }
            });
        }