C# 클래스 fliXNA_xbox.FlxObject

상속: FlxBasic
파일 보기 프로젝트 열기: konamicode/fliXNA_xbox 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
acceleration FlxPoint
allowCollisions uint
angle float
angularAcceleration float
angularDrag float
angularVelocity float
drag FlxPoint
elasticity float
health float
height float
immovable bool
last FlxPoint
mass float
maxAngular float
maxVelocity FlxPoint
moves bool
path FlxPath
pathAngle float
pathSpeed float
scrollFactor FlxPoint
touching uint
velocity FlxPoint
wasTouching uint
width float
x float
y float

보호된 프로퍼티들

프로퍼티 타입 설명
_flicker bool
_flickerTimer float
_pZero FlxPoint
_pathInc int
_pathMode uint
_pathNodeIndex int
_pathRotate bool
_point FlxPoint
_rect FlxRect

공개 메소드들

메소드 설명
FlxObject ( float X, float Y, float Width, float Height ) : System

Instantiates a FlxObject

destroy ( ) : void

Override to null out variables manually

draw ( ) : void

Rarely called. Not yet implemented like AS3 Flixel

drawDebug ( FlxCamera Camera = null ) : void

Not yet implemented

flicker ( float Duration = 1.0f ) : void

Flicker this object

followPath ( FlxPath Path, float Speed = 100, uint Mode = PATH_FORWARD, bool AutoRotate = false ) : void
getMidpoint ( FlxPoint Point = null ) : FlxPoint

Retrieve midpoint of this object in world coordinates

getScreenXY ( FlxPoint Point = null, FlxCamera Camera = null ) : FlxPoint

Call this to figure out the on-screen position of the object

hurt ( float Damage ) : void

Reduces the health

isTouching ( uint Direction ) : bool

Check to see if this object is touching a particular surface

justTouched ( uint Direction ) : bool

Check to see if this object just touched a particular surface

onScreen ( FlxCamera Camera = null ) : bool

Check to see if this object is currently on the screen

overlaps ( FlxBasic ObjectOrGroup, bool InScreenSpace = false, FlxCamera Camera = null ) : bool

Checks to see if some FlxObject overlaps this FlxObject or FlxGroup. If the group has a LOT of things in it, it might be faster to use FlxG.ovelaps()

overlapsAt ( float X, float Y, FlxBasic ObjectOrGroup, bool InScreenSpace = false, FlxCamera Camera = null ) : bool

Checks to see if this FlxObject were located at the given position

overlapsPoint ( FlxPoint Point, bool InScreenSpace = false, FlxCamera Camera = null ) : bool

Check to see if a point in 2D world space overlaps this FlxObject

postUpdate ( ) : void

Called right after update()

preUpdate ( ) : void

Called right before update()

reset ( float X, float Y ) : void

Handy function for reviving game objects. Resets their existence flags and position

separate ( FlxObject Object1, FlxObject Object2 ) : bool

The main collision resolution function

separateX ( FlxObject Object1, FlxObject Object2 ) : bool

X-axis component of the object separation process

separateY ( FlxObject Object1, FlxObject Object2 ) : bool

Y-axis component of the object separation process

stopFollowingPath ( bool DestroyPath = false ) : void
update ( ) : void

보호된 메소드들

메소드 설명
advancePath ( bool Snap = true ) : FlxPoint
updatePathMotion ( ) : void

비공개 메소드들

메소드 설명
updateMotion ( ) : void

Internal function for updating the position and speed of this object.

메소드 상세

FlxObject() 공개 메소드

Instantiates a FlxObject
public FlxObject ( float X, float Y, float Width, float Height ) : System
X float X-coordinate of the object in space
Y float y-coordinate of the object in space
Width float Desired width of the rectangle
Height float Desired height of the rectangle
리턴 System

advancePath() 보호된 메소드

protected advancePath ( bool Snap = true ) : FlxPoint
Snap bool
리턴 FlxPoint

destroy() 공개 메소드

Override to null out variables manually
public destroy ( ) : void
리턴 void

draw() 공개 메소드

Rarely called. Not yet implemented like AS3 Flixel
public draw ( ) : void
리턴 void

drawDebug() 공개 메소드

Not yet implemented
public drawDebug ( FlxCamera Camera = null ) : void
Camera FlxCamera Which Camera - currently only one exists
리턴 void

flicker() 공개 메소드

Flicker this object
public flicker ( float Duration = 1.0f ) : void
Duration float How many seconds
리턴 void

followPath() 공개 메소드

public followPath ( FlxPath Path, float Speed = 100, uint Mode = PATH_FORWARD, bool AutoRotate = false ) : void
Path FlxPath
Speed float
Mode uint
AutoRotate bool
리턴 void

getMidpoint() 공개 메소드

Retrieve midpoint of this object in world coordinates
public getMidpoint ( FlxPoint Point = null ) : FlxPoint
Point FlxPoint
리턴 FlxPoint

getScreenXY() 공개 메소드

Call this to figure out the on-screen position of the object
public getScreenXY ( FlxPoint Point = null, FlxCamera Camera = null ) : FlxPoint
Point FlxPoint Take a FlxPoint object and assign the post-scrolled X and Y values of this object to it
Camera FlxCamera Which Camera - currently only one exists
리턴 FlxPoint

hurt() 공개 메소드

Reduces the health
public hurt ( float Damage ) : void
Damage float Amount to reduce by
리턴 void

isTouching() 공개 메소드

Check to see if this object is touching a particular surface
public isTouching ( uint Direction ) : bool
Direction uint Any of the collision flags (e.g. LEFT, FLOOR, etc)
리턴 bool

justTouched() 공개 메소드

Check to see if this object just touched a particular surface
public justTouched ( uint Direction ) : bool
Direction uint Any of the collision flags (e.g. LEFT, FLOOR, etc)
리턴 bool

onScreen() 공개 메소드

Check to see if this object is currently on the screen
public onScreen ( FlxCamera Camera = null ) : bool
Camera FlxCamera Which Camera - currently only one exists
리턴 bool

overlaps() 공개 메소드

Checks to see if some FlxObject overlaps this FlxObject or FlxGroup. If the group has a LOT of things in it, it might be faster to use FlxG.ovelaps()
public overlaps ( FlxBasic ObjectOrGroup, bool InScreenSpace = false, FlxCamera Camera = null ) : bool
ObjectOrGroup FlxBasic The object or group being tested
InScreenSpace bool Whether to take scroll factors into account.
Camera FlxCamera Which Camera - currently only one exists
리턴 bool

overlapsAt() 공개 메소드

Checks to see if this FlxObject were located at the given position
public overlapsAt ( float X, float Y, FlxBasic ObjectOrGroup, bool InScreenSpace = false, FlxCamera Camera = null ) : bool
X float X position you want to check
Y float Y position you want to check
ObjectOrGroup FlxBasic The object or group being tested
InScreenSpace bool Whether to take scroll factors into account.
Camera FlxCamera Which Camera - currently only one exists
리턴 bool

overlapsPoint() 공개 메소드

Check to see if a point in 2D world space overlaps this FlxObject
public overlapsPoint ( FlxPoint Point, bool InScreenSpace = false, FlxCamera Camera = null ) : bool
Point FlxPoint The point in world space you want to check
InScreenSpace bool Whether to take scroll factors into account.
Camera FlxCamera Which Camera - currently only one exists
리턴 bool

postUpdate() 공개 메소드

Called right after update()
public postUpdate ( ) : void
리턴 void

preUpdate() 공개 메소드

Called right before update()
public preUpdate ( ) : void
리턴 void

reset() 공개 메소드

Handy function for reviving game objects. Resets their existence flags and position
public reset ( float X, float Y ) : void
X float
Y float
리턴 void

separate() 공개 정적인 메소드

The main collision resolution function
public static separate ( FlxObject Object1, FlxObject Object2 ) : bool
Object1 FlxObject
Object2 FlxObject
리턴 bool

separateX() 공개 정적인 메소드

X-axis component of the object separation process
public static separateX ( FlxObject Object1, FlxObject Object2 ) : bool
Object1 FlxObject
Object2 FlxObject
리턴 bool

separateY() 공개 정적인 메소드

Y-axis component of the object separation process
public static separateY ( FlxObject Object1, FlxObject Object2 ) : bool
Object1 FlxObject
Object2 FlxObject
리턴 bool

stopFollowingPath() 공개 메소드

public stopFollowingPath ( bool DestroyPath = false ) : void
DestroyPath bool
리턴 void

update() 공개 메소드

public update ( ) : void
리턴 void

updatePathMotion() 보호된 메소드

protected updatePathMotion ( ) : void
리턴 void

프로퍼티 상세

_flicker 보호되어 있는 프로퍼티

Internal helper for Retro-styled flickering
protected bool _flicker
리턴 bool

_flickerTimer 보호되어 있는 프로퍼티

Internal helper for Retro-styled flickering
protected float _flickerTimer
리턴 float

_pZero 보호되어 있는 정적으로 프로퍼티

Should always represent (0,0) - useful for different things, for avoideing unnecessary new calls
protected static FlxPoint _pZero
리턴 FlxPoint

_pathInc 보호되어 있는 프로퍼티

Internal helper for node navigation, specifically yoyo and backwards movement
protected int _pathInc
리턴 int

_pathMode 보호되어 있는 프로퍼티

Internal tracker for path behavior flags (looping, horizontal only, etc)
protected uint _pathMode
리턴 uint

_pathNodeIndex 보호되어 있는 프로퍼티

Internal helper, tracks which node of the path this object is moving toward
protected int _pathNodeIndex
리턴 int

_pathRotate 보호되어 있는 프로퍼티

Internal flag for whether the object's angle should be adjusted to the path angle during path follow behavior
protected bool _pathRotate
리턴 bool

_point 보호되어 있는 프로퍼티

Pre-allocated x-y point container to be used however you like
protected FlxPoint _point
리턴 FlxPoint

_rect 보호되어 있는 프로퍼티

Pre-allocated rectangle container to be used however you like
protected FlxRect,fliXNA_xbox _rect
리턴 FlxRect

acceleration 공개적으로 프로퍼티

How fast the speed of this object is changing. Useful for smooth movement and gravity
public FlxPoint acceleration
리턴 FlxPoint

allowCollisions 공개적으로 프로퍼티

Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating collision directions. Use bitwise operators to check the values stored here. Useful for things like one-way platforms (e.g. allowCollisions = UP;) The accessor "solid" just flips this variable between NONE and ANY/
public uint allowCollisions
리턴 uint

angle 공개적으로 프로퍼티

The angle of the sprite, used for rotation
public float angle
리턴 float

angularAcceleration 공개적으로 프로퍼티

How fast the spin should change
public float angularAcceleration
리턴 float

angularDrag 공개적으로 프로퍼티

Like drag but for spinning
public float angularDrag
리턴 float

angularVelocity 공개적으로 프로퍼티

How fast you want the sprite to spin
public float angularVelocity
리턴 float

drag 공개적으로 프로퍼티

This is like deceleration that is only applied when acceleration is not affecting the sprite.
public FlxPoint drag
리턴 FlxPoint

elasticity 공개적으로 프로퍼티

The bounciness of this object, Only affects collisions. Default is 0, or "not bouncy at all."
public float elasticity
리턴 float

health 공개적으로 프로퍼티

Handy for storing health percentage or armor points or whatever
public float health
리턴 float

height 공개적으로 프로퍼티

The height of this object
public float height
리턴 float

immovable 공개적으로 프로퍼티

Whether this object will move/alter position after a collision
public bool immovable
리턴 bool

last 공개적으로 프로퍼티

Important variable for collision processing. Set automatically during preUpdate()
public FlxPoint last
리턴 FlxPoint

mass 공개적으로 프로퍼티

Virtual mass of this object. Defauly value is 1. Currently only used with elasticity during collision resolution. Change at your own risk; effects seem crazy unpredictable so far!
public float mass
리턴 float

maxAngular 공개적으로 프로퍼티

Use in conjunction with angularAcceleration fir fluid spin speed control
public float maxAngular
리턴 float

maxVelocity 공개적으로 프로퍼티

Max speed of this object
public FlxPoint maxVelocity
리턴 FlxPoint

moves 공개적으로 프로퍼티

Set this to false if you want to skip automatic motion/movement stuff. Default is true for FlxObject and FlxSprite. Default is false for FlxText, FlxTileblock, FlxTilemap, and FlxSound.
public bool moves
리턴 bool

path 공개적으로 프로퍼티

A reference to a path object. Null by default, assigned by followPath()
public FlxPath path
리턴 FlxPath

pathAngle 공개적으로 프로퍼티

The angle in degrees between this object and the next node, where 0 is directly North, 90 is East
public float pathAngle
리턴 float

pathSpeed 공개적으로 프로퍼티

The speed at which the object is moving on the path. When an object completes a non-looping path circuit, the pathSpeed will be zeroed out, but the path reference will NOT be nulled out. So pathSpeed is a good way to check if this object is currently following a path of not
public float pathSpeed
리턴 float

scrollFactor 공개적으로 프로퍼티

How much this object is affected by the camera subsystem. 0 means it never moves, like a HUD element or background graphic. 1 means it scrolls along at the same speed as the foreground layer. (1,1) by default. CURRENTLY NOT IMPLEMENTED
public FlxPoint scrollFactor
리턴 FlxPoint

touching 공개적으로 프로퍼티

Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts. Use bitwise operators to check the values stored here, or use touching(), justStartedTouching(), etc. You can even use them broadly as boolean values if you're feeling saucy!
public uint touching
리턴 uint

velocity 공개적으로 프로퍼티

Basic speed of this object
public FlxPoint velocity
리턴 FlxPoint

wasTouching 공개적으로 프로퍼티

Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts from the previous game loop step. Use bitwise operators to check the values stored here, or use touching(), justStartedTouching(), etc. You can even use them broadly as boolean values if you're feeling saucy!
public uint wasTouching
리턴 uint

width 공개적으로 프로퍼티

The width of this object
public float width
리턴 float

x 공개적으로 프로퍼티

X position of the upper left corner of this object in world space
public float x
리턴 float

y 공개적으로 프로퍼티

Y position of the upper left corner of this object in world space
public float y
리턴 float