Exemple #1
0
 public void OnRightClick(CanvasPosition position)
 {
     OnContextMenuOpen?.Invoke(position, "Canvas", new Dictionary <string, Action>
     {
         { "Add card", () => _gameService.Canvas.AddObject(_player, position) }
     });
 }
Exemple #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();
 }
Exemple #3
0
 public void OnRightClickMultiple(int[] ids, CanvasPosition position)
 {
     OnContextMenuOpen?.Invoke(position, "Multiple", new Dictionary <string, Action>());
 }
Exemple #4
0
        public void OnRightClickElement(int id, CanvasPosition position)
        {
            var element = _gameService.Canvas.GetObject(id);

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