Commit 1ba3b551 authored by rockyl's avatar rockyl

修复url写死http的问题

parent 86c15430
...@@ -21,6 +21,6 @@ export default class TakeRewards extends DialogContent { ...@@ -21,6 +21,6 @@ export default class TakeRewards extends DialogContent {
} }
onclick() { onclick() {
location.href = this.link location.href = window['recordDetailNewUrl'] + this.link.substr(this.link.lastIndexOf('?'));
} }
} }
...@@ -100,12 +100,12 @@ export default class Game extends InteractComponent { ...@@ -100,12 +100,12 @@ export default class Game extends InteractComponent {
} }
async loadTextures(){ async loadTextures() {
let urls = { let urls = {
treasure: this.configInterface.indexBoxImg, treasure: this.configInterface.indexBoxImg,
stone: this.configInterface.indexBlockImg stone: this.configInterface.indexBlockImg
}; };
for(let key in urls){ for (let key in urls) {
this.blockTextures[key] = await engine.assetsManager.loadTexture(urls[key]); this.blockTextures[key] = await engine.assetsManager.loadTexture(urls[key]);
} }
} }
...@@ -279,7 +279,7 @@ export default class Game extends InteractComponent { ...@@ -279,7 +279,7 @@ export default class Game extends InteractComponent {
let scale; let scale;
if (height <= 0) { if (height <= 0) {
scale = entity.min; scale = entity.min;
}else{ } else {
scale = ts.scale.x * Math.min(height / thisHeight + 0.1, 0.8); scale = ts.scale.x * Math.min(height / thisHeight + 0.1, 0.8);
} }
...@@ -459,7 +459,7 @@ export default class Game extends InteractComponent { ...@@ -459,7 +459,7 @@ export default class Game extends InteractComponent {
this.Button.getComponent(BuriedPoint).setConfig(point.dpm, point.dcm, true) this.Button.getComponent(BuriedPoint).setConfig(point.dpm, point.dcm, true)
} }
onClickActionBtn() { async onClickActionBtn() {
this.clickable = false this.clickable = false
this.stopRotate() this.stopRotate()
const renderer = this.toolTr const renderer = this.toolTr
...@@ -500,29 +500,32 @@ export default class Game extends InteractComponent { ...@@ -500,29 +500,32 @@ export default class Game extends InteractComponent {
const index = this.elementList.findIndex(item => item === result) const index = this.elementList.findIndex(item => item === result)
this.elementList.splice(index, 1) this.elementList.splice(index, 1)
createTween(this, renderer, true) await createTween(this, renderer, true)
.to({ .to({
anchor: { anchor: {
y: this.toolTrAnchorY - per y: this.toolTrAnchorY - per
} }
}, distance / commonSpeedBefore * 1000) }, distance / commonSpeedBefore * 1000)
.call(() => { .call(() => {
if (this.playable && !this.clickable) return }).getPromise();
if (result.type === ElementType.Treasure) {
this.hitTreasure({entity: result.entity}) createTween(this, renderer).to({
} else {
this.hitStone({entity: result.entity, toolDistance: distance})
}
})
.to({
anchor: { anchor: {
y: this.toolTrAnchorY y: this.toolTrAnchorY
} }
}, distance / (result.type === ElementType.Treasure ? commonSpeedAfter : slowSpeed) * 1000, ease.cubicInOut) }, distance / (result.type === ElementType.Treasure ? commonSpeedAfter : slowSpeed) * 1000, ease.cubicInOut)
.call(() => { .call(()=>{
this.startRotate() this.startRotate()
this.clickable = true
}) })
.getPromise();
if (this.playable && !this.clickable) return
if (result.type === ElementType.Treasure) {
await this.hitTreasure({entity: result.entity})
} else {
await this.hitStone({entity: result.entity, toolDistance: distance})
}
this.clickable = true
} }
} }
...@@ -612,11 +615,14 @@ export default class Game extends InteractComponent { ...@@ -612,11 +615,14 @@ export default class Game extends InteractComponent {
const local = locationTs.globalPositionToLocal(global) const local = locationTs.globalPositionToLocal(global)
ts.position.setXY(local.x, local.y) ts.position.setXY(local.x, local.y)
const distance = generatePointDistanceToZeroZero(local.x, local.y) const distance = generatePointDistanceToZeroZero(local.x, local.y)
const speed = 400 const speed = 500
const time = Number((distance / speed).toFixed(4)) * 1000 const time = Number((distance / speed).toFixed(4)) * 1000
const {x: sx, y: sy} = ts.scale const {x: sx, y: sy} = ts.scale
console.log('hitTreasure');
return Promise.all([
createTween(this, ts, true, {initFields: ['x', 'alpha']}) createTween(this, ts, true, {initFields: ['x', 'alpha']})
.to({ .to({
position: {x: local.x > 50 ? 50 : local.x < -50 ? -50 : 0}, position: {x: local.x > 50 ? 50 : local.x < -50 ? -50 : 0},
...@@ -631,14 +637,18 @@ export default class Game extends InteractComponent { ...@@ -631,14 +637,18 @@ export default class Game extends InteractComponent {
alpha: 0 alpha: 0
}, 200) }, 200)
.call(() => { .call(() => {
console.log('hitTreasure2', this.playable, !this.clickable);
if (this.playable && !this.clickable) return if (this.playable && !this.clickable) return
this.setDetail(++this.score, true, this.submit.bind(this)); this.setDetail(++this.score, true, this.submit.bind(this));
}) })
.getPromise(),
createTween(this, ts, false, {initFields: ['y']}) createTween(this, ts, false, {initFields: ['y']})
.to({ .to({
position: {y: this.oy - 50} position: {y: this.oy - 50}
}, time - 200, ease.cubicInOut) }, time - 200, ease.cubicInOut)
.call(() => ts.scale.setXY(ox, oy)) .call(() => ts.scale.setXY(ox, oy))
.getPromise(),
])
} }
private hitStone({entity, toolDistance}) { private hitStone({entity, toolDistance}) {
...@@ -648,7 +658,7 @@ export default class Game extends InteractComponent { ...@@ -648,7 +658,7 @@ export default class Game extends InteractComponent {
const currLocation = curTs.position const currLocation = curTs.position
const distance = generatePointsDistance(currLocation.x, currLocation.y, needLocaltion[0], needLocaltion[1]) const distance = generatePointsDistance(currLocation.x, currLocation.y, needLocaltion[0], needLocaltion[1])
createTween(this, curTs, true, {initFields: ['x', 'y']}) return createTween(this, curTs, true, {initFields: ['x', 'y']})
.to({ .to({
position: { position: {
x: needLocaltion[0], x: needLocaltion[0],
...@@ -662,6 +672,7 @@ export default class Game extends InteractComponent { ...@@ -662,6 +672,7 @@ export default class Game extends InteractComponent {
y: needLocaltion[1], y: needLocaltion[1],
} }
}, 330) }, 330)
.getPromise();
} }
private hitEdge(funcFromX, funcFromY) { private hitEdge(funcFromX, funcFromY) {
......
...@@ -340,7 +340,10 @@ export default class start extends ScillaComponent { ...@@ -340,7 +340,10 @@ export default class start extends ScillaComponent {
return return
} }
if (this.configError) return if (this.configError) return
if (this.isRunning()) location.href = this.homeInfo.prizeUrl if (this.isRunning()) {
const prizeUrl = this.homeInfo.prizeUrl;
location.href = window['recordUrl'] + prizeUrl.substr(prizeUrl.lastIndexOf('?'));
}
} }
showRule() { showRule() {
......
...@@ -6372,6 +6372,7 @@ ...@@ -6372,6 +6372,7 @@
}; };
return Scene; return Scene;
}()); }());
//# sourceMappingURL=Scene.js.map
var ScillaLauncher = (function () { var ScillaLauncher = (function () {
function ScillaLauncher() { function ScillaLauncher() {
...@@ -6467,6 +6468,7 @@ ...@@ -6467,6 +6468,7 @@
}; };
return ScillaLauncher; return ScillaLauncher;
}()); }());
//# sourceMappingURL=index.js.map
var ScillaComponent = (function (_super) { var ScillaComponent = (function (_super) {
__extends(ScillaComponent, _super); __extends(ScillaComponent, _super);
...@@ -6494,6 +6496,7 @@ ...@@ -6494,6 +6496,7 @@
}; };
return ScillaComponent; return ScillaComponent;
}(Component)); }(Component));
//# sourceMappingURL=index.js.map
var dirtyFieldTrigger$1 = decorators.dirtyFieldTrigger; var dirtyFieldTrigger$1 = decorators.dirtyFieldTrigger;
var Renderer = (function (_super) { var Renderer = (function (_super) {
...@@ -6664,6 +6667,7 @@ ...@@ -6664,6 +6667,7 @@
], Renderer.prototype, "anchor", void 0); ], Renderer.prototype, "anchor", void 0);
return Renderer; return Renderer;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var dirtyFieldDetector$1 = decorators.dirtyFieldDetector; var dirtyFieldDetector$1 = decorators.dirtyFieldDetector;
var GraphicRenderer = (function (_super) { var GraphicRenderer = (function (_super) {
...@@ -6750,6 +6754,7 @@ ...@@ -6750,6 +6754,7 @@
], GraphicRenderer.prototype, "maskVisible", void 0); ], GraphicRenderer.prototype, "maskVisible", void 0);
return GraphicRenderer; return GraphicRenderer;
}(Renderer)); }(Renderer));
//# sourceMappingURL=index.js.map
var dirtyFieldDetector$2 = decorators.dirtyFieldDetector, dirtyFieldTrigger$2 = decorators.dirtyFieldTrigger; var dirtyFieldDetector$2 = decorators.dirtyFieldDetector, dirtyFieldTrigger$2 = decorators.dirtyFieldTrigger;
var TextAlign; var TextAlign;
...@@ -7213,6 +7218,7 @@ ...@@ -7213,6 +7218,7 @@
], TextRenderer.prototype, "useCacheMode", void 0); ], TextRenderer.prototype, "useCacheMode", void 0);
return TextRenderer; return TextRenderer;
}(GraphicRenderer)); }(GraphicRenderer));
//# sourceMappingURL=index.js.map
var dirtyFieldDetector$3 = decorators.dirtyFieldDetector, dirtyFieldTrigger$3 = decorators.dirtyFieldTrigger; var dirtyFieldDetector$3 = decorators.dirtyFieldDetector, dirtyFieldTrigger$3 = decorators.dirtyFieldTrigger;
var MATRIX_ORDER; var MATRIX_ORDER;
...@@ -7438,6 +7444,7 @@ ...@@ -7438,6 +7444,7 @@
], Transform.prototype, "rotation", void 0); ], Transform.prototype, "rotation", void 0);
return Transform; return Transform;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var FullStageSize = (function (_super) { var FullStageSize = (function (_super) {
__extends(FullStageSize, _super); __extends(FullStageSize, _super);
...@@ -7486,6 +7493,7 @@ ...@@ -7486,6 +7493,7 @@
}; };
return FullStageSize; return FullStageSize;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var NavigatorAction; var NavigatorAction;
(function (NavigatorAction) { (function (NavigatorAction) {
...@@ -7571,6 +7579,7 @@ ...@@ -7571,6 +7579,7 @@
}; };
return StackNavigator; return StackNavigator;
}()); }());
//# sourceMappingURL=StackNavigator.js.map
var VIEW_WILL_ENTER = 'VIEW_WILL_ENTER'; var VIEW_WILL_ENTER = 'VIEW_WILL_ENTER';
var VIEW_DID_ENTER = 'VIEW_DID_ENTER'; var VIEW_DID_ENTER = 'VIEW_DID_ENTER';
...@@ -7671,6 +7680,7 @@ ...@@ -7671,6 +7680,7 @@
}; };
return VirtualNavigator; return VirtualNavigator;
}(EventEmitter)); }(EventEmitter));
//# sourceMappingURL=VirtualNavigator.js.map
var SingleSceneNavigator = (function (_super) { var SingleSceneNavigator = (function (_super) {
__extends(SingleSceneNavigator, _super); __extends(SingleSceneNavigator, _super);
...@@ -7725,6 +7735,7 @@ ...@@ -7725,6 +7735,7 @@
}; };
return SingleSceneNavigator; return SingleSceneNavigator;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var dirtyFieldDetector$4 = decorators.dirtyFieldDetector; var dirtyFieldDetector$4 = decorators.dirtyFieldDetector;
var floatLayerName = 'floatLayer'; var floatLayerName = 'floatLayer';
...@@ -7802,6 +7813,7 @@ ...@@ -7802,6 +7813,7 @@
], HtmlRenderer.prototype, "color", void 0); ], HtmlRenderer.prototype, "color", void 0);
return HtmlRenderer; return HtmlRenderer;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var dirtyFieldTrigger$4 = decorators.dirtyFieldTrigger; var dirtyFieldTrigger$4 = decorators.dirtyFieldTrigger;
var InteractComponent = (function (_super) { var InteractComponent = (function (_super) {
...@@ -7918,6 +7930,7 @@ ...@@ -7918,6 +7930,7 @@
], InteractComponent.prototype, "interactable", void 0); ], InteractComponent.prototype, "interactable", void 0);
return InteractComponent; return InteractComponent;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var TouchInterrupt = (function (_super) { var TouchInterrupt = (function (_super) {
__extends(TouchInterrupt, _super); __extends(TouchInterrupt, _super);
...@@ -7928,6 +7941,7 @@ ...@@ -7928,6 +7941,7 @@
} }
return TouchInterrupt; return TouchInterrupt;
}(InteractComponent)); }(InteractComponent));
//# sourceMappingURL=index.js.map
var RequestMethod; var RequestMethod;
(function (RequestMethod) { (function (RequestMethod) {
...@@ -8064,6 +8078,7 @@ ...@@ -8064,6 +8078,7 @@
}); });
}); });
} }
//# sourceMappingURL=index.js.map
var ApiComponent = (function (_super) { var ApiComponent = (function (_super) {
__extends(ApiComponent, _super); __extends(ApiComponent, _super);
...@@ -8153,7 +8168,7 @@ ...@@ -8153,7 +8168,7 @@
}); });
}; };
ApiComponent.prototype.getUrl = function () { ApiComponent.prototype.getUrl = function () {
return engine.customConfig.webServiceUrl + this.uri; return (engine.customConfig.webServiceUrl) + this.uri;
}; };
ApiComponent.prototype.call = function () { ApiComponent.prototype.call = function () {
var args = []; var args = [];
...@@ -8200,6 +8215,7 @@ ...@@ -8200,6 +8215,7 @@
}; };
return ApiComponent; return ApiComponent;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var SampleApi = (function (_super) { var SampleApi = (function (_super) {
__extends(SampleApi, _super); __extends(SampleApi, _super);
...@@ -8227,6 +8243,7 @@ ...@@ -8227,6 +8243,7 @@
}; };
return SampleApi; return SampleApi;
}(ApiComponent)); }(ApiComponent));
//# sourceMappingURL=index.js.map
var dirtyFieldDetector$5 = decorators.dirtyFieldDetector, dirtyFieldTrigger$5 = decorators.dirtyFieldTrigger, deepDirtyFieldDetector$1 = decorators.deepDirtyFieldDetector; var dirtyFieldDetector$5 = decorators.dirtyFieldDetector, dirtyFieldTrigger$5 = decorators.dirtyFieldTrigger, deepDirtyFieldDetector$1 = decorators.deepDirtyFieldDetector;
var FillMode; var FillMode;
...@@ -8417,6 +8434,7 @@ ...@@ -8417,6 +8434,7 @@
], TextureRenderer.prototype, "filters", void 0); ], TextureRenderer.prototype, "filters", void 0);
return TextureRenderer; return TextureRenderer;
}(Renderer)); }(Renderer));
//# sourceMappingURL=index.js.map
var RelativeLayout = (function (_super) { var RelativeLayout = (function (_super) {
__extends(RelativeLayout, _super); __extends(RelativeLayout, _super);
...@@ -8567,6 +8585,7 @@ ...@@ -8567,6 +8585,7 @@
}; };
return RelativeLayout; return RelativeLayout;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var TouchZoom = (function (_super) { var TouchZoom = (function (_super) {
__extends(TouchZoom, _super); __extends(TouchZoom, _super);
...@@ -8607,6 +8626,7 @@ ...@@ -8607,6 +8626,7 @@
}; };
return TouchZoom; return TouchZoom;
}(InteractComponent)); }(InteractComponent));
//# sourceMappingURL=index.js.map
var dirtyFieldDetector$6 = decorators.dirtyFieldDetector; var dirtyFieldDetector$6 = decorators.dirtyFieldDetector;
var STATUS$1; var STATUS$1;
...@@ -8743,6 +8763,7 @@ ...@@ -8743,6 +8763,7 @@
], Button.prototype, "disabledLabelColor", void 0); ], Button.prototype, "disabledLabelColor", void 0);
return Button; return Button;
}(InteractComponent)); }(InteractComponent));
//# sourceMappingURL=index.js.map
function bearingsToOutPos(bearings) { function bearingsToOutPos(bearings) {
var _a = engine.renderContext.stageSize, width = _a.width, height = _a.height; var _a = engine.renderContext.stageSize, width = _a.width, height = _a.height;
...@@ -8874,6 +8895,7 @@ ...@@ -8874,6 +8895,7 @@
}); });
} }
}; };
//# sourceMappingURL=PopupEffect.js.map
var dirtyFieldTrigger$6 = decorators.dirtyFieldTrigger; var dirtyFieldTrigger$6 = decorators.dirtyFieldTrigger;
var DialogContent = (function (_super) { var DialogContent = (function (_super) {
...@@ -8927,6 +8949,7 @@ ...@@ -8927,6 +8949,7 @@
PopupEffect["flew"] = "flew"; PopupEffect["flew"] = "flew";
PopupEffect["zoom"] = "zoom"; PopupEffect["zoom"] = "zoom";
})(PopupEffect || (PopupEffect = {})); })(PopupEffect || (PopupEffect = {}));
//# sourceMappingURL=DialogContent.js.map
var dirtyFieldDetector$7 = decorators.dirtyFieldDetector; var dirtyFieldDetector$7 = decorators.dirtyFieldDetector;
var RectRenderer = (function (_super) { var RectRenderer = (function (_super) {
...@@ -8973,6 +8996,7 @@ ...@@ -8973,6 +8996,7 @@
], RectRenderer.prototype, "cornerRadius", void 0); ], RectRenderer.prototype, "cornerRadius", void 0);
return RectRenderer; return RectRenderer;
}(GraphicRenderer)); }(GraphicRenderer));
//# sourceMappingURL=index.js.map
var Popup = (function (_super) { var Popup = (function (_super) {
__extends(Popup, _super); __extends(Popup, _super);
...@@ -9125,6 +9149,7 @@ ...@@ -9125,6 +9149,7 @@
}; };
return Popup; return Popup;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var CameraController = (function (_super) { var CameraController = (function (_super) {
__extends(CameraController, _super); __extends(CameraController, _super);
...@@ -9186,6 +9211,7 @@ ...@@ -9186,6 +9211,7 @@
}; };
return CameraController; return CameraController;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var SamplePollingApi = (function (_super) { var SamplePollingApi = (function (_super) {
__extends(SamplePollingApi, _super); __extends(SamplePollingApi, _super);
...@@ -9232,6 +9258,7 @@ ...@@ -9232,6 +9258,7 @@
}; };
return SamplePollingApi; return SamplePollingApi;
}(ApiComponent)); }(ApiComponent));
//# sourceMappingURL=index.js.map
var LockingType; var LockingType;
(function (LockingType) { (function (LockingType) {
...@@ -9327,6 +9354,7 @@ ...@@ -9327,6 +9354,7 @@
}; };
return ScrollView; return ScrollView;
}(InteractComponent)); }(InteractComponent));
//# sourceMappingURL=index.js.map
var Toast = (function (_super) { var Toast = (function (_super) {
__extends(Toast, _super); __extends(Toast, _super);
...@@ -9387,6 +9415,7 @@ ...@@ -9387,6 +9415,7 @@
}; };
return Toast; return Toast;
}(ScillaComponent)); }(ScillaComponent));
//# sourceMappingURL=index.js.map
var BuriedPoint = (function (_super) { var BuriedPoint = (function (_super) {
__extends(BuriedPoint, _super); __extends(BuriedPoint, _super);
...@@ -9466,6 +9495,7 @@ ...@@ -9466,6 +9495,7 @@
} }
return BuriedPointData; return BuriedPointData;
}()); }());
//# sourceMappingURL=BuriedPoint.js.map
function countDown(from, to, onChange, onComplete) { function countDown(from, to, onChange, onComplete) {
var current = from; var current = from;
...@@ -9481,6 +9511,7 @@ ...@@ -9481,6 +9511,7 @@
}, 1000); }, 1000);
return function () { return clearInterval(timer); }; return function () { return clearInterval(timer); };
} }
//# sourceMappingURL=index.js.map
var constant; var constant;
(function (constant) { (function (constant) {
...@@ -9509,6 +9540,7 @@ ...@@ -9509,6 +9540,7 @@
}; };
return ToolAnimateRotate; return ToolAnimateRotate;
}()); }());
//# sourceMappingURL=ToolAnimate.js.map
var Scale; var Scale;
(function (Scale) { (function (Scale) {
...@@ -9558,6 +9590,7 @@ ...@@ -9558,6 +9590,7 @@
entity.enabled = true; entity.enabled = true;
return entity; return entity;
} }
//# sourceMappingURL=Treasure.js.map
var Scale$1; var Scale$1;
(function (Scale) { (function (Scale) {
...@@ -9607,6 +9640,7 @@ ...@@ -9607,6 +9640,7 @@
entity.enabled = true; entity.enabled = true;
return entity; return entity;
} }
//# sourceMappingURL=Stone.js.map
var Tips = (function (_super) { var Tips = (function (_super) {
__extends(Tips, _super); __extends(Tips, _super);
...@@ -9619,6 +9653,7 @@ ...@@ -9619,6 +9653,7 @@
}; };
return Tips; return Tips;
}(DialogContent)); }(DialogContent));
//# sourceMappingURL=Tips.js.map
engine.dataCenter.register('CFG'); engine.dataCenter.register('CFG');
engine.dataCenter.setBatch('CFG', window['CFG']); engine.dataCenter.setBatch('CFG', window['CFG']);
...@@ -9845,8 +9880,10 @@ ...@@ -9845,8 +9880,10 @@
} }
if (this.configError) if (this.configError)
return; return;
if (this.isRunning()) if (this.isRunning()) {
location.href = this.homeInfo.prizeUrl; var prizeUrl = this.homeInfo.prizeUrl;
location.href = window['recordUrl'] + prizeUrl.substr(prizeUrl.lastIndexOf('?'));
}
}; };
start.prototype.showRule = function () { start.prototype.showRule = function () {
var _this = this; var _this = this;
...@@ -9952,6 +9989,7 @@ ...@@ -9952,6 +9989,7 @@
function isUndefinedOrNull(target) { function isUndefinedOrNull(target) {
return target === undefined || target === null; return target === undefined || target === null;
} }
//# sourceMappingURL=start.js.map
var rotateLeft = function (lValue, iShiftBits) { var rotateLeft = function (lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
...@@ -10144,6 +10182,7 @@ ...@@ -10144,6 +10182,7 @@
var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d); var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
return tempValue.toLowerCase(); return tempValue.toLowerCase();
} }
//# sourceMappingURL=md5.js.map
var TakeRewards = (function (_super) { var TakeRewards = (function (_super) {
__extends(TakeRewards, _super); __extends(TakeRewards, _super);
...@@ -10170,10 +10209,11 @@ ...@@ -10170,10 +10209,11 @@
}); });
}; };
TakeRewards.prototype.onclick = function () { TakeRewards.prototype.onclick = function () {
location.href = this.link; location.href = window['recordDetailNewUrl'] + this.link.substr(this.link.lastIndexOf('?'));
}; };
return TakeRewards; return TakeRewards;
}(DialogContent)); }(DialogContent));
//# sourceMappingURL=TakeRewards.js.map
var Currency = (function (_super) { var Currency = (function (_super) {
__extends(Currency, _super); __extends(Currency, _super);
...@@ -10196,6 +10236,7 @@ ...@@ -10196,6 +10236,7 @@
}; };
return Currency; return Currency;
}(DialogContent)); }(DialogContent));
//# sourceMappingURL=Currency.js.map
var TakeFailed = (function (_super) { var TakeFailed = (function (_super) {
__extends(TakeFailed, _super); __extends(TakeFailed, _super);
...@@ -10211,6 +10252,7 @@ ...@@ -10211,6 +10252,7 @@
}; };
return TakeFailed; return TakeFailed;
}(DialogContent)); }(DialogContent));
//# sourceMappingURL=TakeFailed.js.map
var ElementType; var ElementType;
(function (ElementType) { (function (ElementType) {
...@@ -10632,19 +10674,24 @@ ...@@ -10632,19 +10674,24 @@
}); });
}; };
Game.prototype.onClickActionBtn = function () { Game.prototype.onClickActionBtn = function () {
return __awaiter(this, void 0, void 0, function () {
var renderer, result, ts, boxTs, x, y, local, distance, per, x, y, local, distance, per, index;
var _this = this; var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.clickable = false; this.clickable = false;
this.stopRotate(); this.stopRotate();
var renderer = this.toolTr; renderer = this.toolTr;
var result = this.makeLineInGameCenter(this.Tool); result = this.makeLineInGameCenter(this.Tool);
var ts = this.toolTs; ts = this.toolTs;
var boxTs = this.BoxContainer.getComponent(Transform); boxTs = this.BoxContainer.getComponent(Transform);
if (Array.isArray(result)) { if (!Array.isArray(result)) return [3, 1];
var x = result[0] + boxTs.globalPosition.x; x = result[0] + boxTs.globalPosition.x;
var y = result[1] + boxTs.globalPosition.y; y = result[1] + boxTs.globalPosition.y;
var local = ts.globalPositionToLocal({ x: x, y: y }); local = ts.globalPositionToLocal({ x: x, y: y });
var distance = generatePointsDistance(ts.position.x, ts.position.y, local.x, local.y); distance = generatePointsDistance(ts.position.x, ts.position.y, local.x, local.y);
var per = this.distance2Anchor(distance); per = this.distance2Anchor(distance);
createTween(this, renderer, true) createTween(this, renderer, true)
.to({ .to({
anchor: { anchor: {
...@@ -10660,42 +10707,53 @@ ...@@ -10660,42 +10707,53 @@
_this.startRotate(); _this.startRotate();
_this.clickable = true; _this.clickable = true;
}); });
} return [3, 7];
else { case 1:
var x = result.targetX, y = result.targetY; x = result.targetX, y = result.targetY;
x += boxTs.globalPosition.x; x += boxTs.globalPosition.x;
y += boxTs.globalPosition.y; y += boxTs.globalPosition.y;
var local = ts.globalPositionToLocal({ x: x, y: y }); local = ts.globalPositionToLocal({ x: x, y: y });
var distance_1 = generatePointsDistance(ts.position.x, ts.position.y, local.x, local.y); distance = generatePointsDistance(ts.position.x, ts.position.y, local.x, local.y);
var per = this.distance2Anchor(distance_1); per = this.distance2Anchor(distance);
var index = this.elementList.findIndex(function (item) { return item === result; }); index = this.elementList.findIndex(function (item) { return item === result; });
this.elementList.splice(index, 1); this.elementList.splice(index, 1);
createTween(this, renderer, true) return [4, createTween(this, renderer, true)
.to({ .to({
anchor: { anchor: {
y: this.toolTrAnchorY - per y: this.toolTrAnchorY - per
} }
}, distance_1 / commonSpeedBefore * 1000) }, distance / commonSpeedBefore * 1000)
.call(function () { .call(function () {
if (_this.playable && !_this.clickable) }).getPromise()];
return; case 2:
if (result.type === ElementType.Treasure) { _a.sent();
_this.hitTreasure({ entity: result.entity }); createTween(this, renderer).to({
}
else {
_this.hitStone({ entity: result.entity, toolDistance: distance_1 });
}
})
.to({
anchor: { anchor: {
y: this.toolTrAnchorY y: this.toolTrAnchorY
} }
}, distance_1 / (result.type === ElementType.Treasure ? commonSpeedAfter : slowSpeed) * 1000, ease.cubicInOut) }, distance / (result.type === ElementType.Treasure ? commonSpeedAfter : slowSpeed) * 1000, ease.cubicInOut)
.call(function () { .call(function () {
_this.startRotate(); _this.startRotate();
_this.clickable = true; })
}); .getPromise();
if (this.playable && !this.clickable)
return [2];
if (!(result.type === ElementType.Treasure)) return [3, 4];
return [4, this.hitTreasure({ entity: result.entity })];
case 3:
_a.sent();
return [3, 6];
case 4: return [4, this.hitStone({ entity: result.entity, toolDistance: distance })];
case 5:
_a.sent();
_a.label = 6;
case 6:
this.clickable = true;
_a.label = 7;
case 7: return [2];
} }
});
});
}; };
Game.prototype.distance2Anchor = function (distance) { Game.prototype.distance2Anchor = function (distance) {
return (distance - 100) / this.toolTs.height; return (distance - 100) / this.toolTs.height;
...@@ -10775,9 +10833,11 @@ ...@@ -10775,9 +10833,11 @@
var local = locationTs.globalPositionToLocal(global); var local = locationTs.globalPositionToLocal(global);
ts.position.setXY(local.x, local.y); ts.position.setXY(local.x, local.y);
var distance = generatePointDistanceToZeroZero(local.x, local.y); var distance = generatePointDistanceToZeroZero(local.x, local.y);
var speed = 400; var speed = 500;
var time = Number((distance / speed).toFixed(4)) * 1000; var time = Number((distance / speed).toFixed(4)) * 1000;
var _c = ts.scale, sx = _c.x, sy = _c.y; var _c = ts.scale, sx = _c.x, sy = _c.y;
console.log('hitTreasure');
return Promise.all([
createTween(this, ts, true, { initFields: ['x', 'alpha'] }) createTween(this, ts, true, { initFields: ['x', 'alpha'] })
.to({ .to({
position: { x: local.x > 50 ? 50 : local.x < -50 ? -50 : 0 }, position: { x: local.x > 50 ? 50 : local.x < -50 ? -50 : 0 },
...@@ -10792,15 +10852,19 @@ ...@@ -10792,15 +10852,19 @@
alpha: 0 alpha: 0
}, 200) }, 200)
.call(function () { .call(function () {
console.log('hitTreasure2', _this.playable, !_this.clickable);
if (_this.playable && !_this.clickable) if (_this.playable && !_this.clickable)
return; return;
_this.setDetail(++_this.score, true, _this.submit.bind(_this)); _this.setDetail(++_this.score, true, _this.submit.bind(_this));
}); })
.getPromise(),
createTween(this, ts, false, { initFields: ['y'] }) createTween(this, ts, false, { initFields: ['y'] })
.to({ .to({
position: { y: this.oy - 50 } position: { y: this.oy - 50 }
}, time - 200, ease.cubicInOut) }, time - 200, ease.cubicInOut)
.call(function () { return ts.scale.setXY(ox, oy); }); .call(function () { return ts.scale.setXY(ox, oy); })
.getPromise(),
]);
}; };
Game.prototype.hitStone = function (_a) { Game.prototype.hitStone = function (_a) {
var entity = _a.entity, toolDistance = _a.toolDistance; var entity = _a.entity, toolDistance = _a.toolDistance;
...@@ -10809,7 +10873,7 @@ ...@@ -10809,7 +10873,7 @@
var curTs = entity.getComponent(Transform); var curTs = entity.getComponent(Transform);
var currLocation = curTs.position; var currLocation = curTs.position;
var distance = generatePointsDistance(currLocation.x, currLocation.y, needLocaltion[0], needLocaltion[1]); var distance = generatePointsDistance(currLocation.x, currLocation.y, needLocaltion[0], needLocaltion[1]);
createTween(this, curTs, true, { initFields: ['x', 'y'] }) return createTween(this, curTs, true, { initFields: ['x', 'y'] })
.to({ .to({
position: { position: {
x: needLocaltion[0], x: needLocaltion[0],
...@@ -10822,7 +10886,8 @@ ...@@ -10822,7 +10886,8 @@
x: needLocaltion[0], x: needLocaltion[0],
y: needLocaltion[1], y: needLocaltion[1],
} }
}, 330); }, 330)
.getPromise();
}; };
Game.prototype.hitEdge = function (funcFromX, funcFromY) { Game.prototype.hitEdge = function (funcFromX, funcFromY) {
var _a = this.BoxContainer.getComponent(Transform), width = _a.width, height = _a.height; var _a = this.BoxContainer.getComponent(Transform), width = _a.width, height = _a.height;
...@@ -10889,6 +10954,7 @@ ...@@ -10889,6 +10954,7 @@
function lineRight(x1, y1, x2, y2, a, b) { function lineRight(x1, y1, x2, y2, a, b) {
return (b - ((x2 * y2 - x1 * y1) / (x2 - x1))) / ((y2 - y1) / (x1 - x2) - a); return (b - ((x2 * y2 - x1 * y1) / (x2 - x1))) / ((y2 - y1) / (x1 - x2) - a);
} }
//# sourceMappingURL=Game.js.map
var Normal = (function (_super) { var Normal = (function (_super) {
__extends(Normal, _super); __extends(Normal, _super);
...@@ -10899,6 +10965,7 @@ ...@@ -10899,6 +10965,7 @@
}; };
return Normal; return Normal;
}(DialogContent)); }(DialogContent));
//# sourceMappingURL=Normal.js.map
engine.registerDef('components/renderer/TextRenderer', TextRenderer); engine.registerDef('components/renderer/TextRenderer', TextRenderer);
engine.registerDef('components/base/Transform', Transform); engine.registerDef('components/base/Transform', Transform);
...@@ -10925,6 +10992,7 @@ ...@@ -10925,6 +10992,7 @@
engine.registerDef('./scripts/dialog/TakeFailed', TakeFailed); engine.registerDef('./scripts/dialog/TakeFailed', TakeFailed);
engine.registerDef('./scripts/dialog/Tips', Tips); engine.registerDef('./scripts/dialog/Tips', Tips);
engine.registerDef('./scripts/dialog/Currency', Currency); engine.registerDef('./scripts/dialog/Currency', Currency);
//# sourceMappingURL=MustCompile.js.map
var launcher; var launcher;
modifyEngineConfig({ modifyEngineConfig({
...@@ -10949,6 +11017,7 @@ ...@@ -10949,6 +11017,7 @@
}); });
}); });
} }
//# sourceMappingURL=main.js.map
exports.startup = startup; exports.startup = startup;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -288,7 +288,8 @@ ...@@ -288,7 +288,8 @@
<script> <script>
var CFG = { var CFG = {
opId: 83189 opId: 83189
} };
var DEBUG = true;
</script> </script>
<script src="//yun.duiba.com.cn/db_games/activity/public_js/fetch-jsonp.min.js"></script> <script src="//yun.duiba.com.cn/db_games/activity/public_js/fetch-jsonp.min.js"></script>
<script src="debug/bundle.js"></script> <script src="debug/bundle.js"></script>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
}, },
"entryScene": "main" "entryScene": "main"
}, },
"webServiceUrl": "http://localhost:3000" "webServiceUrl": "http://localhost:3001"
}, },
"dataCenterConfig": { "dataCenterConfig": {
"dataCenterRoot": [ "dataCenterRoot": [
......
{ {
"success":false, "success":true,
"code":"0901011", "code":"0901011",
"desc":"OK", "desc":"OK",
"timestamp":1543501361476, "timestamp":1543501361476,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"title":"title", "title":"title",
"rule":"<p><strong>测试测试</strong></p><p><em style=\"color: rgb(51, 51, 51);\">测试测试</em></p><p><strong style=\"color: rgb(51, 51, 51);\"><em>测试测试</em></strong></p>", "rule":"<p><strong>测试测试</strong></p><p><em style=\"color: rgb(51, 51, 51);\">测试测试</em></p><p><strong style=\"color: rgb(51, 51, 51);\"><em>测试测试</em></strong></p>",
"box":10, "box":10,
"continueTime":5, "continueTime":60,
"earnCreditsUrl": "//yun.duiba.com.cn/h5/activity/goldminer/images/indexRuleImg.png", "earnCreditsUrl": "//yun.duiba.com.cn/h5/activity/goldminer/images/indexRuleImg.png",
"prizeList":[ "prizeList":[
{ {
......
{"/Users/firefly/duiba/demoList/minner-tool/assets/scripts/HelloScilla.ts":1561020169937.0137,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/HelloScilla.ts":1561020169937.0137,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/DialogContent.ts":1561600311985.8552,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Network.ts":1561600425062.0408,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Normal.ts":1562566682279.367,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Tips.ts":1563342864232.2847,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeRewards.ts":1561604368987.917,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/scenes/start.ts":1563414744765.5208,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Game.ts":1563517294108.954,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/index.ts":1561701943800.5488,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/ToolAnimate.ts":1562061481431.2627,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Treasure.ts":1562036486693.9104,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Stone.ts":1562036497419.1833,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Currency.ts":1562576376017.156,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeFailed.ts":1562567908671.4026,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/BuriedPoint.ts":1562566605218.4138,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Currency.ts":1563759198037.1516,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Normal.ts":1563759198037.4158,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeFailed.ts":1563942766706.9917,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeRewards.ts":1563759198037.9731,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Tips.ts":1563759198038.2512,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Game.ts":1563967580359.461,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Stone.ts":1563877946954.2656,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/ToolAnimate.ts":1563759198039.2769,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Treasure.ts":1563877946951.9539,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/scenes/start.ts":1563958374197.611,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/BuriedPoint.ts":1563759198040.374,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/index.ts":1563759198040.6511} {"/Users/firefly/duiba/demoList/minner-tool/assets/scripts/HelloScilla.ts":1561020169937.0137,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/HelloScilla.ts":1561020169937.0137,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/DialogContent.ts":1561600311985.8552,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Network.ts":1561600425062.0408,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Normal.ts":1562566682279.367,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Tips.ts":1563342864232.2847,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeRewards.ts":1561604368987.917,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/scenes/start.ts":1563414744765.5208,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Game.ts":1563517294108.954,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/index.ts":1561701943800.5488,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/ToolAnimate.ts":1562061481431.2627,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Treasure.ts":1562036486693.9104,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Stone.ts":1562036497419.1833,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Currency.ts":1562576376017.156,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeFailed.ts":1562567908671.4026,"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/BuriedPoint.ts":1562566605218.4138,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Currency.ts":1563759198037.1516,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Normal.ts":1563759198037.4158,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeFailed.ts":1563942766706.9917,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeRewards.ts":1568278918207.8828,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Tips.ts":1563759198038.2512,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Game.ts":1566887047804.8462,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Stone.ts":1563877946954.2656,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/ToolAnimate.ts":1563759198039.2769,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Treasure.ts":1563877946951.9539,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/scenes/start.ts":1568277429304.0603,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/BuriedPoint.ts":1563759198040.374,"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/index.ts":1563759198040.6511}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment