C# 클래스 geek.GameEngine.Visuals.InteractableObject

The class that defines an object that can test for collisions and UI interaction.
상속: DynamicObject
파일 보기 프로젝트 열기: impworks/xna.geek.engine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DebugOutput bool
IsTouchable bool
TouchMode TouchMode

공개 메소드들

메소드 설명
Draw ( SpriteBatch batch ) : void
EntersPlayfield ( RectSide side ) : bool

Checks if the object has just entered the playfield. The object must enter it naturally using it's momentum.

EntersRect ( RectSide side, Rectangle rect, bool absolute ) : bool

Checks whether the object enters a rectangle.

EntersScreen ( RectSide side ) : bool

Checks if the object has just entered the screen. The object must enter it naturally using it's momentum.

IsClicked ( ) : bool

Check if the user has released the tap on the object. Fires once per release.

IsInsideRect ( Rectangle rect, bool absolute = false ) : bool

Checks whether this object is inside a rectangle.

IsOffPlayfield ( ) : bool

Checks whether the object is fully outside the playfield of current level.

IsOffScreen ( ) : bool

Checks whether the object is fully invisible.

IsOnPlayfield ( ) : bool

Checks whether the object is fully inside the playfield of current level.

IsOnScreen ( ) : bool

Checks whether the object is fully inside the screen.

IsOutsideRect ( Rectangle rect, bool absolute = false ) : bool

Checks whether this object is inside a rectangle.

IsOverlappedWith ( InteractableObject obj ) : bool

Check whether an object collides with another object. Collision is rectangle based and non-rotatable.

IsPressed ( ) : bool

Check if the user has pressed the object with their finger. Fires continuosly until the finger is released.

IsTapped ( ) : bool

Check if the object has been tapped. Fires once per tap & hold.

LeavesPlayfield ( RectSide side ) : bool

Checks if the object has just left the playfield. The object must leave it naturally using it's momentum.

LeavesRect ( RectSide side, Rectangle rect, bool absolute ) : bool

Checks whether the object leaves a rectangle.

LeavesScreen ( RectSide side ) : bool

Checks if the object has just left the screen. The object must leave it naturally using it's momentum.

Update ( ) : void

보호된 메소드들

메소드 설명
InteractableObject ( ) : System.Diagnostics

비공개 메소드들

메소드 설명
drawBoundingBox ( ) : void

Draws the bounding box on screen.

drawHotSpot ( ) : void

Draws the cross where the hot spot of the object is located.

entersRectFromBottom ( Rectangle rect, Rectangle box ) : bool

Checks if the object enters a specific rectangle from the bottom.

entersRectFromLeft ( Rectangle rect, Rectangle box ) : bool

Checks if the object enters a specific rectangle from the left.

entersRectFromRight ( Rectangle rect, Rectangle box ) : bool

Checks if the object enters a specific rectangle from the right.

entersRectFromTop ( Rectangle rect, Rectangle box ) : bool

Checks if the object enters a specific rectangle from the top.

findTouch ( Rectangle zone ) : TouchLocation?

Find a touch location that matches the current object.

leavesRectFromBottom ( Rectangle rect, Rectangle box ) : bool

Checks if the object leaves a specific rectangle to the bottom.

leavesRectFromLeft ( Rectangle rect, Rectangle box ) : bool

Checks if the object leaves a specific rectangle to the left.

leavesRectFromRight ( Rectangle rect, Rectangle box ) : bool

Checks if the object leaves a specific rectangle to the right.

leavesRectFromTop ( Rectangle rect, Rectangle box ) : bool

Checks if the object leaves a specific rectangle to the top.

메소드 상세

Draw() 공개 메소드

public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

EntersPlayfield() 공개 메소드

Checks if the object has just entered the playfield. The object must enter it naturally using it's momentum.
public EntersPlayfield ( RectSide side ) : bool
side RectSide Side of the screen.
리턴 bool

EntersRect() 공개 메소드

Checks whether the object enters a rectangle.
public EntersRect ( RectSide side, Rectangle rect, bool absolute ) : bool
side RectSide Rectangle side.
rect Microsoft.Xna.Framework.Rectangle Rectangle.
absolute bool Flag indicating whether rectangle coordinates are screen-bound or playfield-bound.
리턴 bool

EntersScreen() 공개 메소드

Checks if the object has just entered the screen. The object must enter it naturally using it's momentum.
public EntersScreen ( RectSide side ) : bool
side RectSide Side of the screen.
리턴 bool

InteractableObject() 보호된 메소드

protected InteractableObject ( ) : System.Diagnostics
리턴 System.Diagnostics

IsClicked() 공개 메소드

Check if the user has released the tap on the object. Fires once per release.
public IsClicked ( ) : bool
리턴 bool

IsInsideRect() 공개 메소드

Checks whether this object is inside a rectangle.
public IsInsideRect ( Rectangle rect, bool absolute = false ) : bool
rect Microsoft.Xna.Framework.Rectangle Rectangle to test.
absolute bool Absolute or relative coordinates.
리턴 bool

IsOffPlayfield() 공개 메소드

Checks whether the object is fully outside the playfield of current level.
public IsOffPlayfield ( ) : bool
리턴 bool

IsOffScreen() 공개 메소드

Checks whether the object is fully invisible.
public IsOffScreen ( ) : bool
리턴 bool

IsOnPlayfield() 공개 메소드

Checks whether the object is fully inside the playfield of current level.
public IsOnPlayfield ( ) : bool
리턴 bool

IsOnScreen() 공개 메소드

Checks whether the object is fully inside the screen.
public IsOnScreen ( ) : bool
리턴 bool

IsOutsideRect() 공개 메소드

Checks whether this object is inside a rectangle.
public IsOutsideRect ( Rectangle rect, bool absolute = false ) : bool
rect Microsoft.Xna.Framework.Rectangle Rectangle to test.
absolute bool Absolute or relative coordinates.
리턴 bool

IsOverlappedWith() 공개 메소드

Check whether an object collides with another object. Collision is rectangle based and non-rotatable.
public IsOverlappedWith ( InteractableObject obj ) : bool
obj InteractableObject Object to test collision to.
리턴 bool

IsPressed() 공개 메소드

Check if the user has pressed the object with their finger. Fires continuosly until the finger is released.
public IsPressed ( ) : bool
리턴 bool

IsTapped() 공개 메소드

Check if the object has been tapped. Fires once per tap & hold.
public IsTapped ( ) : bool
리턴 bool

LeavesPlayfield() 공개 메소드

Checks if the object has just left the playfield. The object must leave it naturally using it's momentum.
public LeavesPlayfield ( RectSide side ) : bool
side RectSide Side of the playfield.
리턴 bool

LeavesRect() 공개 메소드

Checks whether the object leaves a rectangle.
public LeavesRect ( RectSide side, Rectangle rect, bool absolute ) : bool
side RectSide Rectangle side.
rect Microsoft.Xna.Framework.Rectangle Rectangle.
absolute bool Flag indicating whether rectangle coordinates are screen-bound or playfield-bound.
리턴 bool

LeavesScreen() 공개 메소드

Checks if the object has just left the screen. The object must leave it naturally using it's momentum.
public LeavesScreen ( RectSide side ) : bool
side RectSide Side of the screen.
리턴 bool

Update() 공개 메소드

public Update ( ) : void
리턴 void

프로퍼티 상세

DebugOutput 공개적으로 프로퍼티

Enables or disables bounding box drawing.
public bool DebugOutput
리턴 bool

IsTouchable 공개적으로 프로퍼티

Enables or disables touch panel querying.
public bool IsTouchable
리턴 bool

TouchMode 공개적으로 프로퍼티

Gets or sets the touch handling mode.
public TouchMode TouchMode
리턴 TouchMode