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