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
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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