C# Класс WaveEngine.Components.Gestures.TouchGestures

Наследование: Behavior, ITouchable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

AddTouch() публичный Метод

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.
Результат void

Contains() публичный Метод

Determines whether the required Collider2D contains the passed point.
public Contains ( System.Vector2 point ) : bool
point System.Vector2 The point.
Результат bool

DefaultValues() защищенный Метод

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
Результат void

DeleteDependencies() защищенный Метод

Delete dependencies method
protected DeleteDependencies ( ) : void
Результат void

ReadGesture() публичный Метод

Gets the current GestureSample.
public ReadGesture ( ) : GestureSample
Результат GestureSample

ResolveDependencies() защищенный Метод

Resolves the dependencies needed for this instance to work.
protected ResolveDependencies ( ) : void
Результат void

TouchGestures() публичный Метод

Initializes a new instance of the TouchGestures class.
public TouchGestures ( ) : System
Результат System

TouchGestures() публичный Метод

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
Результат System

Update() защищенный Метод

Updates this behavior.
protected Update ( System.TimeSpan gameTime ) : void
gameTime System.TimeSpan The elapsed game time.
Результат void

UpdateTouchOrder() публичный Метод

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
Результат void