C# Class ZombieShooter.Obj

Show file Open project: Spectrewiz/Zombie-Shooter Class Usage Examples

Public Properties

Property Type Description
alive bool
area Microsoft.Xna.Framework.Rectangle
frame Point
health int
imageArea Rectangle
imageIndex float
name string
objSpriteDB Texture2D>.Dictionary
position Vector2
rotation float
scale float
sprite Texture2D
velocity Vector2

Protected Properties

Property Type Description
imageNumber int
imageSpeed float

Public Methods

Method Description
Collision ( Obj obj ) : Obj
Collision ( Vector2 pos, Obj obj ) : bool
Collision ( Vector2 pos, bool checkSolids ) : bool
Damage ( int damage ) : void
Draw ( SpriteBatch spriteBatch ) : void
InitSpriteDB ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
Obj ( Vector2 position ) : System
PushTo ( Vector2 velocity, float direction ) : void
SnapToGrid ( ) : void
Update ( ) : void
UpdateArea ( ) : void
pointDirection ( Vector2 first, Vector2 second ) : float
pointDistance ( Vector2 first, Vector2 second ) : float

Method Details

Collision() public method

public Collision ( Obj obj ) : Obj
obj Obj
return Obj

Collision() public method

public Collision ( Vector2 pos, Obj obj ) : bool
pos Vector2
obj Obj
return bool

Collision() public method

public Collision ( Vector2 pos, bool checkSolids ) : bool
pos Vector2
checkSolids bool
return bool

Damage() public method

public Damage ( int damage ) : void
damage int
return void

Draw() public method

public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

InitSpriteDB() public static method

public static InitSpriteDB ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
return void

LoadContent() public method

public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
return void

Obj() public method

public Obj ( Vector2 position ) : System
position Vector2
return System

PushTo() public method

public PushTo ( Vector2 velocity, float direction ) : void
velocity Vector2
direction float
return void

SnapToGrid() public method

public SnapToGrid ( ) : void
return void

Update() public method

public Update ( ) : void
return void

UpdateArea() public method

public UpdateArea ( ) : void
return void

pointDirection() public method

public pointDirection ( Vector2 first, Vector2 second ) : float
first Vector2
second Vector2
return float

pointDistance() public method

public pointDistance ( Vector2 first, Vector2 second ) : float
first Vector2
second Vector2
return float

Property Details

alive public property

public bool alive
return bool

area public property

public Rectangle,Microsoft.Xna.Framework area
return Microsoft.Xna.Framework.Rectangle

frame public property

public Point frame
return Point

health public property

public int health
return int

imageArea public property

public Rectangle imageArea
return Rectangle

imageIndex public property

public float imageIndex
return float

imageNumber protected property

protected int imageNumber
return int

imageSpeed protected property

protected float imageSpeed
return float

name public property

public string name
return string

objSpriteDB public static property

public static Dictionary objSpriteDB
return Texture2D>.Dictionary

position public property

public Vector2 position
return Vector2

rotation public property

public float rotation
return float

scale public property

public float scale
return float

sprite public property

public Texture2D sprite
return Texture2D

velocity public property

public Vector2 velocity
return Vector2