Commit cc65c4f8 authored by lujinlei's avatar lujinlei

-a

parent 7b597ba5
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,7 +13,6 @@
LabelType["egg"] = "egg";
})(LabelType || (LabelType = {}));
var LabelType$1 = LabelType;
//# sourceMappingURL=LabelType.js.map
var props = {};
function prepareProps() {
......@@ -23,7 +22,6 @@
function injectProps(p) {
engine.injectProp(props, p);
}
//# sourceMappingURL=props.js.map
var levels;
var setlevelData = function () {
......@@ -40,7 +38,6 @@
var setTouchEnabled = function (b) {
touchEnabled = b;
};
//# sourceMappingURL=GoldData.js.map
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
......@@ -48,7 +45,6 @@
function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid);
}
//# sourceMappingURL=utils.js.map
var Tool = (function () {
function Tool() {
......@@ -71,7 +67,6 @@
};
return Tool;
}());
//# sourceMappingURL=Tools.js.map
var curScore;
function getScore() {
......@@ -124,7 +119,6 @@
}
return getLevelData().max;
};
//# sourceMappingURL=goldData.js.map
var GameData = (function (_super) {
tslib.__extends(GameData, _super);
......@@ -211,7 +205,6 @@
};
return GameData;
}(engine.Container));
//# sourceMappingURL=gameData.js.map
var BaseItem = (function (_super) {
tslib.__extends(BaseItem, _super);
......@@ -236,7 +229,6 @@
});
return BaseItem;
}(engine.Sprite));
//# sourceMappingURL=BaseItem.js.map
var EgretRender = (function () {
function EgretRender(root, engine) {
......@@ -320,7 +312,6 @@
};
return EgretRender;
}());
//# sourceMappingURL=EgretRender.js.map
var wall = 1;
var basket = 2;
......@@ -334,7 +325,6 @@
var awardMask = wall + basket + bubble;
var bubbleMask = wall + basket + award;
var bubbleStandbyMask = wall + basket;
//# sourceMappingURL=collisionConfig.js.map
var vibrate = (function (view, count, strength) {
if (count === void 0) { count = 2; }
......@@ -372,7 +362,6 @@
}
});
});
//# sourceMappingURL=vibrate.js.map
var MovieClip = (function (_super) {
tslib.__extends(MovieClip, _super);
......@@ -461,14 +450,12 @@
});
return MovieClip;
}(engine.Image));
//# sourceMappingURL=MovieClip.js.map
var wait = function (duration) { return tslib.__awaiter(void 0, void 0, void 0, function () {
return tslib.__generator(this, function (_a) {
return [2, new Promise(function (resolve) { return setTimeout(resolve, duration); })];
});
}); };
//# sourceMappingURL=wait.js.map
var josnData = {};
function getJsonAsset(name) {
......@@ -501,7 +488,6 @@
function getJosnData(jsonName) {
return josnData[jsonName] || null;
}
//# sourceMappingURL=JsonTools.js.map
function createTextureSheet(baseTexture, altaData) {
var frames = altaData;
......@@ -530,7 +516,6 @@
}
return textures;
}
//# sourceMappingURL=createTextureSheet.js.map
function playMovieClip(parent, key, frames, frameInterval) {
if (frameInterval === void 0) { frameInterval = 5; }
......@@ -615,7 +600,6 @@
var playSuccess = function (parent) {
return playMovieClip(parent, 'success', ['success1.png', 'success2.png', 'success3.png', 'success4.png', 'success5.png', 'success6.png', 'success7.png', 'success8.png', 'success9.png'], 5);
};
//# sourceMappingURL=playMovieClip.js.map
var createCoin = function (scale) {
var josnData = getJosnData('coin');
......@@ -642,7 +626,6 @@
});
return movieclip;
};
//# sourceMappingURL=createCoin.js.map
var createBoom = function (scale) {
var josnData = getJosnData('boom');
......@@ -669,7 +652,6 @@
});
return movieclip;
};
//# sourceMappingURL=createBoom.js.map
var createGift = function (scale) {
var josnData = getJosnData('gift');
......@@ -696,7 +678,6 @@
});
return movieclip;
};
//# sourceMappingURL=createGift.js.map
var createCandy = function (scale) {
var josnData = getJosnData('candy');
......@@ -723,7 +704,6 @@
});
return movieclip;
};
//# sourceMappingURL=createCandy.js.map
var createEgg = function (scale) {
var josnData = getJosnData('egg');
......@@ -750,7 +730,6 @@
});
return movieclip;
};
//# sourceMappingURL=createEgg.js.map
var createItem = function (scale, type) {
var funcs = {
......@@ -763,7 +742,6 @@
var func = funcs[type];
return func(scale);
};
//# sourceMappingURL=createItem.js.map
var createBubble = function (_this, type, x, y, force, density) {
if (force === void 0) { force = { x: 0, y: 0 }; }
......@@ -812,7 +790,6 @@
}
}, 100);
});
//# sourceMappingURL=createItems.js.map
var clear = function (that) {
TextList.forEach(function (i) {
......@@ -859,7 +836,6 @@
});
}); };
var TextList = ['great', 'cool', 'perfect', 'awesome', 'unbelievable'];
//# sourceMappingURL=playTextAni.js.map
function check(_this) {
var egretRenderContainer = _this.egretRenderContainer;
......@@ -907,7 +883,6 @@
}
});
}
//# sourceMappingURL=check.js.map
var createBox = function (_this) {
var path1 = Matter.Vertices.fromPath('385 370 630 380 670 728 620 1080 370 1100 109 1090 57 728 108 370 0 370 0 1624 750 1624 750 0', null);
......@@ -934,7 +909,6 @@
var h2 = 10;
var rect3 = _this._egretRender.rectangle(375, 1100, w2, h2, null, { isStatic: true, collisionFilter: { group: wall, category: wall, mask: wallMask } });
};
//# sourceMappingURL=createBox.js.map
var createBubblePic = function (r) {
var bubbleTexture = getTextureByName('bubble');
......@@ -942,7 +916,6 @@
bubblePic.scaleX = bubblePic.scaleY = r * 2 / 100;
return bubblePic;
};
//# sourceMappingURL=createBubblePic.js.map
var timerLeft;
var timerRight;
......@@ -990,7 +963,6 @@
var n = end - start;
return Math.random() * n + start;
};
//# sourceMappingURL=standbyBubbles.js.map
var createBtns = (function (that) {
var createShape = function () {
......@@ -1034,7 +1006,6 @@
that._rightBtn.addChild(shapeR);
shapeLeft.alpha = shapeR.alpha = 0;
});
//# sourceMappingURL=createBtns.js.map
var GameView = (function (_super) {
tslib.__extends(GameView, _super);
......@@ -1049,7 +1020,7 @@
}
GameView.prototype.start = function (color) {
return tslib.__awaiter(this, void 0, void 0, function () {
var a, gameNode, contPng, leftBtn, rightBtn, light, basket_bottom, tmpRect, basket_top, glass, gameData, countDown, countDownLabel;
var a, gameNode, contPng, leftBtn, rightBtn, light, basket_bottom, tmpRect, gameData, countDown, countDownLabel, basket_top, glass;
return tslib.__generator(this, function (_a) {
a = new engine.Shape();
this.addChild(a);
......@@ -1091,14 +1062,6 @@
tmpRect.height = 300;
this.addChild(tmpRect);
basket_bottom.mask = tmpRect;
basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
glass = this._basket_top = new engine.Sprite(getTextureByName('玻璃'));
glass.x = (750 - glass.width) / 2;
glass.y = 340;
this.addChild(glass);
gameData = this._gameData = new GameData(contPng, color);
contPng.addChild(gameData);
countDown = this._countDown = new engine.Sprite(getTextureByName('倒计时'));
......@@ -1106,12 +1069,21 @@
countDown.y = 180;
this.addChild(countDown);
this._curLevelTime = getlevelTime();
countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime, 48, "#ffffff");
countDownLabel.x = (countDown.width - countDownLabel.width) / 2;
countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime, 48, "#ffffff", false, engine.TEXT_ALIGN.CENTER);
countDownLabel.width = 160;
countDownLabel.x = 0;
countDownLabel.y = (countDown.height - countDownLabel.height) / 2 - 5;
countDown.addChild(countDownLabel);
this.initGameHint();
this.startHandle();
basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
glass = this._basket_top = new engine.Sprite(getTextureByName('玻璃'));
glass.x = (750 - glass.width) / 2;
glass.y = 340;
this.addChild(glass);
this.levelHint();
return [2];
});
......@@ -1197,7 +1169,6 @@
this._gameData.levelUpdate();
this._curLevelTime = getlevelTime();
this._countDownLabel.text = this._curLevelTime;
this._countDownLabel.x = (this._countDown.width - this._countDownLabel.width) / 2;
this.runEngine();
};
GameView.prototype.themeChange = function (data) {
......@@ -1337,7 +1308,6 @@
GameView.prototype.updateCountDown = function () {
this._curLevelTime--;
this._countDownLabel.text = this._curLevelTime;
this._countDownLabel.x = (this._countDown.width - this._countDownLabel.width) / 2;
if (this._curLevelTime <= 0) {
this.end();
console.log('时间结束');
......@@ -1384,7 +1354,6 @@
};
return GameView;
}(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super);
......@@ -1430,7 +1399,6 @@
var instance = new GameWrapper();
return instance;
}
//# sourceMappingURL=index.js.map
return index;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -95,15 +95,7 @@ export default class GameView extends engine.Container {
this.addChild(tmpRect);
basket_bottom.mask = tmpRect;
let basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
let glass = this._basket_top = new engine.Sprite(getTextureByName('玻璃'));
glass.x = (750-glass.width)/2;
glass.y = 340;
this.addChild(glass);
let gameData = this._gameData = new GameData(contPng,color);
......@@ -114,10 +106,12 @@ export default class GameView extends engine.Container {
countDown.x = 5;
countDown.y = 180;
this.addChild(countDown);
this._curLevelTime = getlevelTime()
let countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime,48,"#ffffff")
countDownLabel.x = (countDown.width-countDownLabel.width)/2
let countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime,48,"#ffffff",false,engine.TEXT_ALIGN.CENTER)
countDownLabel.width = 160
countDownLabel.x = 0
countDownLabel.y = (countDown.height-countDownLabel.height)/2 - 5
countDown.addChild(countDownLabel);
......@@ -142,6 +136,15 @@ export default class GameView extends engine.Container {
// rect.addChild(toast);
this.startHandle();
let basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
let glass = this._basket_top = new engine.Sprite(getTextureByName('玻璃'));
glass.x = (750-glass.width)/2;
glass.y = 340;
this.addChild(glass);
this.levelHint();
}
private _lvbg;
......@@ -241,7 +244,7 @@ export default class GameView extends engine.Container {
this._gameData.levelUpdate();
this._curLevelTime = getlevelTime()
this._countDownLabel.text = this._curLevelTime;
this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
//this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
this.runEngine();
}
themeChange(data){
......@@ -395,7 +398,7 @@ export default class GameView extends engine.Container {
updateCountDown(){
this._curLevelTime --
this._countDownLabel.text = this._curLevelTime;
this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
//this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
if(this._curLevelTime <= 0)
{
this.end();
......
......@@ -29,7 +29,7 @@ export class GameWrapper extends engine.Container {
//this.start(null);
// setTimeout(() => {
// engine.globalEvent.dispatchEvent('seabed-game-startNextLevel',{level:2});
// engine.globalEvent.dispatchEvent('seabed-game-startNextLevel',{level:1});
// }, 300);
}
start(event: engine.Event) {
......
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