Ejemplo n.º 1
0
 public void OnRightClick(CanvasPosition position)
 {
     OnContextMenuOpen?.Invoke(position, "Canvas", new Dictionary <string, Action>
     {
         { "Add card", () => _gameService.Canvas.AddObject(_player, position) }
     });
 }
Ejemplo n.º 2
0
 public Card(Canvas canvas, int id, CanvasPosition position, string value = null)
 {
     Canvas      = canvas;
     Id          = id;
     Position    = position;
     DisplayName = "Card";
     Image       = DeckOfCards.BackUrl;
     FaceUp      = false;
     Value       = value ?? DeckOfCards.GetRandomCard();
 }
Ejemplo n.º 3
0
 public void OnRightClickMultiple(int[] ids, CanvasPosition position)
 {
     OnContextMenuOpen?.Invoke(position, "Multiple", new Dictionary <string, Action>());
 }
Ejemplo n.º 4
0
        public void OnRightClickElement(int id, CanvasPosition position)
        {
            var element = _gameService.Canvas.GetObject(id);

            OnContextMenuOpen?.Invoke(position, element.DisplayName, element.GetContextMenuOptions());
        }