C# Class ZombieShooter.Obj

ファイルを表示 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_oe property

public bool alive
return bool

area public_oe property

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

frame public_oe property

public Point frame
return Point

health public_oe property

public int health
return int

imageArea public_oe property

public Rectangle imageArea
return Rectangle

imageIndex public_oe property

public float imageIndex
return float

imageNumber protected_oe property

protected int imageNumber
return int

imageSpeed protected_oe property

protected float imageSpeed
return float

name public_oe property

public string name
return string

objSpriteDB public_oe static_oe property

public static Dictionary objSpriteDB
return Texture2D>.Dictionary

position public_oe property

public Vector2 position
return Vector2

rotation public_oe property

public float rotation
return float

scale public_oe property

public float scale
return float

sprite public_oe property

public Texture2D sprite
return Texture2D

velocity public_oe property

public Vector2 velocity
return Vector2