C# 클래스 BattleShip.casePlatform

파일 보기 프로젝트 열기: LucienCamuglia/Battleships 1 사용 예제들

공개 메소드들

메소드 설명
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