C# Class WaveEngine.Components.Gestures.TouchGestures

Inheritance: Behavior, ITouchable
Afficher le fichier Open project: WaveEngine/Components Class Usage Examples

Private Properties

Свойство Type Description
ComputeCentroid System.Vector2
DrawOrderPropertyChanged void
FindTwoFarthestTouches void
FreeState void
InvokeEvent void
IsGestureSupported bool
IsMoving bool
IsMovingOverThreshold bool
NoneState void
PressedState void
StoppedAndDragState void
TapState void
UpdatePreviousValues void

Méthodes publiques

Méthode Description
AddTouch ( TouchLocation touch, bool isNew ) : void

Adds a TouchLocation to the current active touches.

Contains ( System.Vector2 point ) : bool

Determines whether the required Collider2D contains the passed point.

ReadGesture ( ) : GestureSample

Gets the current GestureSample.

TouchGestures ( ) : System

Initializes a new instance of the TouchGestures class.

TouchGestures ( bool projectCamera = true ) : System

Initializes a new instance of the TouchGestures class. By default, scale is within [0.1, 5], the delta scale is set to 1 and there is no supported gesture.

UpdateTouchOrder ( ) : void

If and only if ManualTouchOrder is set to false (by default it is) the touch order is calculated based on both and the Layer used.

Méthodes protégées

Méthode Description
DefaultValues ( ) : void

This methods is used to set default values by the default constructor of our classes. This is called too when an entity is deserializing.

DeleteDependencies ( ) : void

Delete dependencies method

ResolveDependencies ( ) : void

Resolves the dependencies needed for this instance to work.

Update ( System.TimeSpan gameTime ) : void

Updates this behavior.

Private Methods

Méthode Description
ComputeCentroid ( List touches ) : System.Vector2

Computes the centroid of a group of touches.

DrawOrderPropertyChanged ( object sender, DependencyPropertyChangedEventArgs &e ) : void

Draws the order property changed.

FindTwoFarthestTouches ( List touches, System.Vector2 &point1, System.Vector2 &point2 ) : void

Finds the two farthest touches in a group of touches.

FreeState ( ) : void

Handle the FreeState

InvokeEvent ( EventHandler touchEvent, GestureSample sample ) : void

Invokes the event.

IsGestureSupported ( SupportedGesture type ) : bool

Determines whether a type of gesture is supported.

IsMoving ( ) : bool

Determines whether this instance is moving.

IsMovingOverThreshold ( ) : bool

Determines whether [is moving over threshold].

NoneState ( ) : void

Handle the NoneState

PressedState ( ) : void

Handle the PressedState

StoppedAndDragState ( ) : void

Handle the StoppedAndDragState

TapState ( ) : void

Handle the TapState

UpdatePreviousValues ( ) : void

Updates the previous values.

Method Details

AddTouch() public méthode

Adds a TouchLocation to the current active touches.
public AddTouch ( TouchLocation touch, bool isNew ) : void
touch TouchLocation The touch location.
isNew bool Whether such touch must be considered as new.
Résultat void

Contains() public méthode

Determines whether the required Collider2D contains the passed point.
public Contains ( System.Vector2 point ) : bool
point System.Vector2 The point.
Résultat bool

DefaultValues() protected méthode

This methods is used to set default values by the default constructor of our classes. This is called too when an entity is deserializing.
protected DefaultValues ( ) : void
Résultat void

DeleteDependencies() protected méthode

Delete dependencies method
protected DeleteDependencies ( ) : void
Résultat void

ReadGesture() public méthode

Gets the current GestureSample.
public ReadGesture ( ) : GestureSample
Résultat GestureSample

ResolveDependencies() protected méthode

Resolves the dependencies needed for this instance to work.
protected ResolveDependencies ( ) : void
Résultat void

TouchGestures() public méthode

Initializes a new instance of the TouchGestures class.
public TouchGestures ( ) : System
Résultat System

TouchGestures() public méthode

Initializes a new instance of the TouchGestures class. By default, scale is within [0.1, 5], the delta scale is set to 1 and there is no supported gesture.
public TouchGestures ( bool projectCamera = true ) : System
projectCamera bool Indicates if the touches will be processed using Cameras
Résultat System

Update() protected méthode

Updates this behavior.
protected Update ( System.TimeSpan gameTime ) : void
gameTime System.TimeSpan The elapsed game time.
Résultat void

UpdateTouchOrder() public méthode

If and only if ManualTouchOrder is set to false (by default it is) the touch order is calculated based on both and the Layer used.
public UpdateTouchOrder ( ) : void
Résultat void