C# Класс BattleShip.casePlatform

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DisplayCase ( Graphics g ) : void

create a case of a platform

DisplayCross ( Graphics g, int x, int y ) : void

display a red cross inside a case

IsBetweenCase ( int mouseX, int mouseY ) : bool

test if the cursor position is between a case

OverCase ( int x, int y ) : void

check if the mouse is over the case and display it

casePlatform ( int x, int y, int size, Color color ) : System

Приватные методы

Метод Описание
ChangeRectLocation ( int x, int y ) : void

change the rectangle location if the case size has change

ChangeRectSize ( int size ) : void

change the size of the rectangle if the case size size has change

Описание методов

DisplayCase() публичный метод

create a case of a platform
public DisplayCase ( Graphics g ) : void
g System.Drawing.Graphics
Результат void

DisplayCross() публичный метод

display a red cross inside a case
public DisplayCross ( Graphics g, int x, int y ) : void
g System.Drawing.Graphics
x int coordinate x of the case
y int coordinate y of the case
Результат void

IsBetweenCase() публичный метод

test if the cursor position is between a case
public IsBetweenCase ( int mouseX, int mouseY ) : bool
mouseX int position x of the mouse cursor
mouseY int position y of the mouse cursor
Результат bool

OverCase() публичный метод

check if the mouse is over the case and display it
public OverCase ( int x, int y ) : void
x int
y int
Результат void

casePlatform() публичный метод

public casePlatform ( int x, int y, int size, Color color ) : System
x int
y int
size int
color Color
Результат System