protected void ClickTile(BoardCell cell, int index) { if (!GameManager.IsGameFinished) { GameManager.ExecuteMove(cell, index); } OnTileClicked.Invoke(index); }
void ReadInput() { Tile currentMouseoverTile = _world.GetTile(GetCurrentMouseWorldPos()); if (currentMouseoverTile != null) { if (currentMouseoverTile != _previousMouseoverTile) { OnTileHovered?.Invoke(currentMouseoverTile); } // Check what (if any) Tile was clicked if (Input.GetMouseButtonDown(0)) { OnTileClicked?.Invoke(currentMouseoverTile); } } _previousMouseoverTile = currentMouseoverTile; }
public void OnClicked() { OnTileClicked?.Invoke(TileID); }
public void TileClick() { OnTileClicked?.Invoke(this); }
public void TileClicked(TileController clickedTile) { OnTileClicked?.Invoke(clickedTile); }
protected override void OnClick(EventArgs e) { base.OnClick(e); OnTileClicked?.Invoke(this); }
private void TileCanvas_MouseClick(object sender, MouseEventArgs e) { IsClicked = true; OnTileClicked.Invoke(this, this); }