新增input类 用于管理触摸点信息

This commit is contained in:
YHH
2020-06-19 22:43:56 +08:00
parent 9bd5a99c81
commit 60646edd6b
12 changed files with 540 additions and 15 deletions

View File

@@ -885,6 +885,37 @@ declare class GlobalManager {
static unregisterGlobalManager(manager: GlobalManager): void;
static getGlobalManager<T extends GlobalManager>(type: any): T;
}
declare class TouchState {
x: number;
y: number;
touchPoint: number;
touchDown: boolean;
readonly position: Vector2;
reset(): void;
}
declare class Input {
private static _init;
private static _stage;
private static _previousTouchState;
private static _gameTouchs;
private static _resolutionOffset;
private static _resolutionScale;
private static _touchIndex;
private static _totalTouchCount;
static readonly touchPosition: Vector2;
static maxSupportedTouch: number;
static readonly resolutionScale: Vector2;
static readonly totalTouchCount: number;
static readonly gameTouchs: TouchState[];
static readonly touchPositionDelta: Vector2;
static initialize(): void;
private static initTouchCache;
private static touchBegin;
private static touchMove;
private static touchEnd;
private static setpreviousTouchState;
static scaledPosition(position: Vector2): Vector2;
}
declare class ListPool {
private static readonly _objectQueue;
static warmCache(cacheCount: number): void;