public GridTile(int posX, int posY, Control parent, OnTileClick onClick, OnTileClick onMissedShot) { _posX = posX; _posY = posY; _hasShip = false; _showShip = false; _showCanPlace = false; _showCantPlace = false; _onClick = onClick; _onMissedShot = onMissedShot; _control = new TransparentControl(OnMouseEnter, OnMouseLeave, OnMouseClick); _control.Size = new Size(64, 64); _control.Location = new Point(_posX, _posY); Refresh(); parent.Controls.Add(_control); }
void OnDestroy() { onTileClick = null; mTextMesh = null; }
public GridController(Control control, OnTileClick onClick, OnTileClick onMissedShot) { _parent = control; _onClick = onClick; _onMissedShot = onMissedShot; }