C# 클래스 MyGame.FirstAidManager

This class represent the First aid manager that manages creating first aids and calling updates on them, also removing first aid and adding health to player at collision detected.
상속: Microsoft.Xna.Framework.DrawableGameComponent
파일 보기 프로젝트 열기: mahmoudbahaa/XNA-Game-project 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( GameTime gameTime ) : void

This method renders the current state.

FirstAidManager ( MyGame game ) : System
Update ( GameTime gameTime ) : void

Allows the component to run logic.

checkCollisionWithBullet ( Unit unit ) : bool

if the unit(player or bullet) collide with the first aid add the health

비공개 메소드들

메소드 설명
addFirstAidKit ( ) : void

Add a new medkit at a random location on the terrain

addHealth ( int j ) : void

add health specified by difficult constants to the health of the player and remove the mdekit

메소드 상세

Draw() 공개 메소드

This method renders the current state.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The elapsed game time.
리턴 void

FirstAidManager() 공개 메소드

public FirstAidManager ( MyGame game ) : System
game MyGame
리턴 System

Update() 공개 메소드

Allows the component to run logic.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The gametime.
리턴 void

checkCollisionWithBullet() 공개 메소드

if the unit(player or bullet) collide with the first aid add the health
public checkCollisionWithBullet ( Unit unit ) : bool
unit Unit Unit to check collision with
리턴 bool