新增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

@@ -20,8 +20,8 @@ class Camera extends Component {
if (this._areBoundsDirty){
let stage = this.stage;
let topLeft = this.screenToWorldPoint(new Vector2(stage.x + this._inset.left, stage.y + this._inset.top));
let bottomRight = this.screenToWorldPoint(new Vector2(stage.x + stage.stageWidth - this._inset.right, stage.y + stage.stageHeight - this._inset.bottom));
let topLeft = this.screenToWorldPoint(new Vector2(this._inset.left, this._inset.top));
let bottomRight = this.screenToWorldPoint(new Vector2(stage.stageWidth - this._inset.right, stage.stageHeight - this._inset.bottom));
if (this.entity.transform.rotation != 0){
let topRight = this.screenToWorldPoint(new Vector2(stage.stageWidth - this._inset.right, this._inset.top));