Свойство | Тип | Описание | |
---|---|---|---|
camera | Microsoft.Xna.Framework.Vector2 | ||
visible | System.Boolean |
Метод | Описание | |
---|---|---|
World ( ) : System |
constructor
|
|
add ( Entity e ) : Entity |
Adds the Entity to the World at the end of the frame.
|
|
addGraphic ( |
Adds an Entity to the World with the Graphic object.
|
|
addList ( ) : void |
Adds multiple Entities to the world.
|
|
addMask ( |
Adds an Entity to the World with the Mask object.
|
|
begin ( ) : void |
Override this; called when World is switch to, and set to the currently active world.
|
|
bringForward ( Entity e ) : System.Boolean |
Shifts the Entity one place towards the front of its contained layer.
|
|
bringToFront ( Entity e ) : System.Boolean |
Brings the Entity to the front of its contained layer.
|
|
classCount ( string name ) : uint |
Returns the amount of Entities of the Class are in the World.
|
|
classFirst ( string name ) : Entity |
The first Entity of the Class.
|
|
clearRecycled ( string classType ) : void |
Clears stored reycled Entities of the Class type.
|
|
clearRecycledAll ( ) : void |
Clears stored recycled Entities of all Class types.
|
|
collideLine ( string type, int fromX, int fromY, int toX, int toY, int precision = 1, PunkX p = null ) : Entity |
Returns the first Entity found that collides with the line.
|
|
collidePoint ( string type, float pX, float pY ) : Entity |
Returns the first Entity found that collides with the position.
|
|
collidePointInto ( string type, float pX, float pY, Object &into ) : void |
Populates an array with all Entities that collide with the position. This function does not empty the array, that responsibility is left to the user.
|
|
collideRect ( string type, float rX, float rY, int rWidth, int rHeight ) : Entity |
Returns the first Entity that collides with the rectangular area.
|
|
collideRectInto ( string type, float rX, float rY, int rWidth, int rHeight, Object &into ) : void |
Populates an array with all Entities that collide with the rectangle. This function does not empty the array, that responsibility is left to the user.
|
|
create ( string classType, System.Boolean addToWorld = true ) : Entity |
Returns a new Entity, or a stored recycled Entity if one exists.
|
|
end ( ) : void |
Override this; called when World is changed, and the active world is no longer this.
|
|
getAll ( Object &into ) : void |
Pushes all Entities in the World into the array.
|
|
getClass ( string name, Object &into ) : void |
Pushes all Entities in the World of the Class into the Array or Vector.
|
|
getLayer ( int layer, Object &into ) : void |
Pushes all Entities in the World on the layer into the Array or Vector.
|
|
getType ( string type, Object &into ) : void |
Pushes all Entities in the World of the type into the Array or Vector.
|
|
isAtBack ( Entity e ) : System.Boolean |
If the Entity as at the back of its layer.
|
|
isAtFront ( Entity e ) : System.Boolean |
If the Entity as at the front of its layer.
|
|
layerCount ( int layer ) : uint |
Returns the amount of Entities are on the layer in the World.
|
|
layerFirst ( int layer ) : Entity |
The first Entity on the Layer.
|
|
layerLast ( int layer ) : Entity |
The last Entity on the Layer.
|
|
nearestToEntity ( string type, Entity e, System.Boolean useHitboxes = false ) : Entity |
Finds the Entity nearest to another.
|
|
nearestToPoint ( string type, float x, float y, System.Boolean useHitboxes = false ) : Entity |
Finds the Entity nearest to the position.
|
|
nearestToRect ( string type, float x, float y, int width, int height ) : Entity |
Finds the Entity nearest to the rectangle.
|
|
recycle ( Entity e ) : Entity |
Removes the Entity from the World at the end of the frame and recycles it. The recycled Entity can then be fetched again by calling the create() function.
|
|
remove ( Entity e ) : Entity |
Removes the Entity from the World at the end of the frame.
|
|
removeAll ( ) : void |
Removes all Entities from the World at the end of the frame.
|
|
removeList ( ) : void |
Removes multiple Entities from the world.
|
|
render ( ) : void |
Performed by the game loop, renders all contained Entities. If you override this to give your World render code, remember to call super.render() or your Entities will not be rendered.
|
|
sendBackward ( Entity e ) : System.Boolean |
Shifts the Entity one place towards the back of its contained layer.
|
|
sendToBack ( Entity e ) : System.Boolean |
Sends the Entity to the back of its contained layer.
|
|
typeCount ( string type ) : uint |
Returns the amount of Entities of the type are in the World.
|
|
typeFirst ( string type ) : Entity |
The first Entity of the type.
|
|
update ( ) : void |
Performed by the game loop, updates all contained Entities. If you override this to give your World update code, remember to call super.update() or your Entities will not be updated.
|
|
updateLists ( ) : void |
Updates the add/remove lists at the end of the frame.
|
Метод | Описание | |
---|---|---|
addRender ( Entity e ) : void |
Adds Entity to the render list.
|
|
addType ( Entity e ) : void |
Adds Entity to the type list.
|
|
addUpdate ( Entity e ) : void |
Adds Entity to the update list.
|
|
removeRender ( Entity e ) : void |
Removes Entity from the render list.
|
|
removeType ( Entity e ) : void |
Removes Entity from the type list.
|
|
removeUpdate ( Entity e ) : void |
Removes Entity from the update list.
|
|
squarePointRect ( float px, float py, float rx, float ry, int rw, int rh ) : float |
Calculates the squared distance between a rectangle and a point.
|
|
squarePoints ( float x1, float y1, float x2, float y2 ) : float |
Calculates the squared distance between two points.
|
|
squareRects ( float x1, float y1, int w1, int h1, float x2, float y2, int w2, int h2 ) : float |
Calculates the squared distance between two rectangles.
|
public add ( Entity e ) : Entity | ||
e | Entity | Entity object you want to add. |
Результат | Entity |
public addGraphic ( |
||
graphic | Graphic to assign the Entity. | |
layer | int | Layer of the Entity. |
x | float | X position of the Entity. |
y | float | Y position of the Entity. |
Результат | Entity |
public addMask ( |
||
mask | Mask to assign the Entity. | |
type | string | Collision type of the Entity. |
x | float | X position of the Entity. |
y | float | Y position of the Entity. |
Результат | Entity |
public bringForward ( Entity e ) : System.Boolean | ||
e | Entity | The Entity to shift. |
Результат | System.Boolean |
public bringToFront ( Entity e ) : System.Boolean | ||
e | Entity | The Entity to shift. |
Результат | System.Boolean |
public classCount ( string name ) : uint | ||
name | string | The Class type to count. |
Результат | uint |
public classFirst ( string name ) : Entity | ||
name | string | The Class type to check. |
Результат | Entity |
public clearRecycled ( string classType ) : void | ||
classType | string | The Class type to clear. |
Результат | void |
public collideLine ( string type, int fromX, int fromY, int toX, int toY, int precision = 1, PunkX p = null ) : Entity | ||
type | string | The Entity type to check for. |
fromX | int | Start x of the line. |
fromY | int | Start y of the line. |
toX | int | End x of the line. |
toY | int | End y of the line. |
precision | int | fixme |
p | PunkX | fixme |
Результат | Entity |
public collidePoint ( string type, float pX, float pY ) : Entity | ||
type | string | The Entity type to check for. |
pX | float | X position. |
pY | float | Y position. |
Результат | Entity |
public collidePointInto ( string type, float pX, float pY, Object &into ) : void | ||
type | string | The Entity type to check for. |
pX | float | X position. |
pY | float | Y position. |
into | Object | The Array or Vector to populate with collided Entities. |
Результат | void |
public collideRect ( string type, float rX, float rY, int rWidth, int rHeight ) : Entity | ||
type | string | The Entity type to check for. |
rX | float | X position of the rectangle. |
rY | float | Y position of the rectangle. |
rWidth | int | Width of the rectangle. |
rHeight | int | Height of the rectangle. |
Результат | Entity |
public collideRectInto ( string type, float rX, float rY, int rWidth, int rHeight, Object &into ) : void | ||
type | string | The Entity type to check for. |
rX | float | X position of the rectangle. |
rY | float | Y position of the rectangle. |
rWidth | int | Width of the rectangle. |
rHeight | int | Height of the rectangle. |
into | Object | The Array or Vector to populate with collided Entities. |
Результат | void |
public create ( string classType, System.Boolean addToWorld = true ) : Entity | ||
classType | string | The Class of the Entity you want to add. |
addToWorld | System.Boolean | Add it to the World immediately. |
Результат | Entity |
public getAll ( Object &into ) : void | ||
into | Object | The Array or Vector to populate. |
Результат | void |
public getClass ( string name, Object &into ) : void | ||
name | string | The Class type to check. |
into | Object | The Array or Vector to populate. |
Результат | void |
public getLayer ( int layer, Object &into ) : void | ||
layer | int | The layer to check. |
into | Object | The Array or Vector to populate. |
Результат | void |
public getType ( string type, Object &into ) : void | ||
type | string | The type to check. |
into | Object | The Array or Vector to populate. |
Результат | void |
public isAtBack ( Entity e ) : System.Boolean | ||
e | Entity | The Entity to check. |
Результат | System.Boolean |
public isAtFront ( Entity e ) : System.Boolean | ||
e | Entity | The Entity to check. |
Результат | System.Boolean |
public layerCount ( int layer ) : uint | ||
layer | int | The layer to count Entities on. |
Результат | uint |
public layerFirst ( int layer ) : Entity | ||
layer | int | The layer to check. |
Результат | Entity |
public layerLast ( int layer ) : Entity | ||
layer | int | The layer to check. |
Результат | Entity |
public nearestToEntity ( string type, Entity e, System.Boolean useHitboxes = false ) : Entity | ||
type | string | The Entity type to check for. |
e | Entity | The Entity to find the nearest to. |
useHitboxes | System.Boolean | If the Entities' hitboxes should be used to determine the distance. If false, their x/y coordinates are used. |
Результат | Entity |
public nearestToPoint ( string type, float x, float y, System.Boolean useHitboxes = false ) : Entity | ||
type | string | The Entity type to check for. |
x | float | X position. |
y | float | Y position. |
useHitboxes | System.Boolean | If the Entities' hitboxes should be used to determine the distance. If false, their x/y coordinates are used. |
Результат | Entity |
public nearestToRect ( string type, float x, float y, int width, int height ) : Entity | ||
type | string | The Entity type to check for. |
x | float | X position of the rectangle. |
y | float | Y position of the rectangle. |
width | int | Width of the rectangle. |
height | int | Height of the rectangle. |
Результат | Entity |
public recycle ( Entity e ) : Entity | ||
e | Entity | The Entity to recycle. |
Результат | Entity |
public remove ( Entity e ) : Entity | ||
e | Entity | Entity object you want to remove. |
Результат | Entity |
public sendBackward ( Entity e ) : System.Boolean | ||
e | Entity | The Entity to shift. |
Результат | System.Boolean |
public sendToBack ( Entity e ) : System.Boolean | ||
e | Entity | The Entity to shift. |
Результат | System.Boolean |
public typeCount ( string type ) : uint | ||
type | string | The type (or Class type) to count. |
Результат | uint |
public typeFirst ( string type ) : Entity | ||
type | string | The type to check. |
Результат | Entity |
public Microsoft.Xna.Framework.Vector2 camera | ||
Результат | Microsoft.Xna.Framework.Vector2 |