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