新增跟随相机

This commit is contained in:
YHH
2020-06-19 09:16:49 +08:00
parent b83b1a5b21
commit 981e149ca5
14 changed files with 509 additions and 31 deletions

View File

@@ -155,8 +155,8 @@ class Scene extends egret.DisplayObjectContainer {
}
public prepRenderState() {
this._projectionMatrix.m11 = 2 / this.stage.width;
this._projectionMatrix.m22 = -2 / this.stage.height;
this._projectionMatrix.m11 = 2 / this.stage.stageWidth;
this._projectionMatrix.m22 = -2 / this.stage.stageHeight;
this._transformMatrix = this.camera.transformMatrix;
this._matrixTransformMatrix = Matrix2D.multiply(this._transformMatrix, this._projectionMatrix);