Commit 5c486690 authored by wildfirecode13's avatar wildfirecode13

1

parent eccf6925
This diff is collapsed.
...@@ -488,7 +488,6 @@ ...@@ -488,7 +488,6 @@
}; };
return Player; return Player;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Player.js.map
var ObjectPool = engine.ObjectPool; var ObjectPool = engine.ObjectPool;
var PoolName = 'gold-bag'; var PoolName = 'gold-bag';
...@@ -524,22 +523,12 @@ ...@@ -524,22 +523,12 @@
var base = this.base = new Base(); var base = this.base = new Base();
frontContainer.addChild(base); frontContainer.addChild(base);
base.setup(); base.setup();
var blockShadow = this._blockShadow = new engine.Image(getTextureByName('方块阴影'));
blockShadow.anchorX = blockShadow.width / 2;
blockShadow.anchorY = blockShadow.height / 2;
blockShadow.x = -(blockShadow.width - base.width) / 2;
blockShadow.y = props.blockShadowOffset;
base.addChild(blockShadow);
var blockContainer = this.blockContainer = new engine.Container(); var blockContainer = this.blockContainer = new engine.Container();
frontContainer.addChild(blockContainer); frontContainer.addChild(blockContainer);
var player = this.player = new Player(); var player = this.player = new Player();
frontContainer.addChild(player); frontContainer.addChild(player);
player.setup(); player.setup();
player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this); player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this);
var playerShadow = this._playerShadow = new engine.Image(getTextureByName('玩家阴影'));
playerShadow.anchorX = playerShadow.width / 2;
playerShadow.anchorY = playerShadow.height / 2;
playerShadow.x = this.player.x - playerShadow.width / 2;
var scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container(); var scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container();
scoreAddTipsContainer.width = 750; scoreAddTipsContainer.width = 750;
scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2; scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2;
...@@ -553,7 +542,6 @@ ...@@ -553,7 +542,6 @@
scoreAddTips.text = "+0"; scoreAddTips.text = "+0";
scoreAddTips.x = this.player.x - scoreAddTips.width / 2; scoreAddTips.x = this.player.x - scoreAddTips.width / 2;
scoreAddTipsContainer.addChild(scoreAddTips); scoreAddTipsContainer.addChild(scoreAddTips);
frontContainer.addChild(playerShadow);
frontContainer.addChild(player); frontContainer.addChild(player);
frontContainer.addChild(scoreAddTipsContainer); frontContainer.addChild(scoreAddTipsContainer);
ObjectPool.recycleObject(PoolName, ObjectPool.getObject(PoolName, { ObjectPool.recycleObject(PoolName, ObjectPool.getObject(PoolName, {
...@@ -636,7 +624,6 @@ ...@@ -636,7 +624,6 @@
return tslib.__generator(this, function (_a) { return tslib.__generator(this, function (_a) {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
this._playerShadow.y = this.player.y + props.playerShadowOffset;
this.scoreAddTipsContainer.y = this.player.y + props.scoreAddTipsOffset; this.scoreAddTipsContainer.y = this.player.y + props.scoreAddTipsOffset;
if (!!revive) return [3, 2]; if (!!revive) return [3, 2];
return [4, this.player.playReady()]; return [4, this.player.playReady()];
...@@ -820,7 +807,6 @@ ...@@ -820,7 +807,6 @@
this.needHitTest = false; this.needHitTest = false;
clearInterval(this.timer); clearInterval(this.timer);
this.currentBlock.playHit(); this.currentBlock.playHit();
this._playerShadow.visible = false;
return [4, this.player.hitAway(dir)]; return [4, this.player.hitAway(dir)];
case 1: case 1:
_a.sent(); _a.sent();
...@@ -844,7 +830,6 @@ ...@@ -844,7 +830,6 @@
if (!this._touchEnabled) { if (!this._touchEnabled) {
return [2]; return [2];
} }
this._playerShadow.visible = false;
this._touchEnabled = false; this._touchEnabled = false;
this.playOpenGoldBag(); this.playOpenGoldBag();
return [4, this.player.jump()]; return [4, this.player.jump()];
...@@ -870,10 +855,6 @@ ...@@ -870,10 +855,6 @@
if (type === 0) { if (type === 0) {
this.currentBlock.playProFect(); this.currentBlock.playProFect();
} }
if (type != 3) {
this._playerShadow.visible = true;
}
this._playerShadow.y = this.player.y + props.playerShadowOffset;
this.player.playLand(type, this.currentBlock.dir); this.player.playLand(type, this.currentBlock.dir);
this.currentBlock.stop(); this.currentBlock.stop();
this.scoreChange(type); this.scoreChange(type);
...@@ -957,6 +938,7 @@ ...@@ -957,6 +938,7 @@
}; };
return GameView; return GameView;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameView.js.map
var JumpHigh = (function (_super) { var JumpHigh = (function (_super) {
tslib.__extends(JumpHigh, _super); tslib.__extends(JumpHigh, _super);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -274,30 +274,13 @@ ...@@ -274,30 +274,13 @@
} }
}, },
"assets": [ "assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{ {
"name": "完美方块素材", "name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga", "url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39", "uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga" "ext": ".svga"
}, },
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{ {
"name": "背景图", "name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/c90e6bc6718e4cc83d30bf2ce8b9f80a909adbee.jpg", "url": "//yun.duiba.com.cn/aurora/assets/c90e6bc6718e4cc83d30bf2ce8b9f80a909adbee.jpg",
......
...@@ -42,8 +42,6 @@ export default class GameView extends engine.Container { ...@@ -42,8 +42,6 @@ export default class GameView extends engine.Container {
_pos; _pos;
_score; _score;
_remainToShowGoldBag; _remainToShowGoldBag;
_blockShadow
_playerShadow
lastLandType; lastLandType;
scoreAddTips scoreAddTips
...@@ -80,14 +78,6 @@ export default class GameView extends engine.Container { ...@@ -80,14 +78,6 @@ export default class GameView extends engine.Container {
frontContainer.addChild(base); frontContainer.addChild(base);
base.setup(); base.setup();
let blockShadow = this._blockShadow = new engine.Image(getTextureByName('方块阴影'));
blockShadow.anchorX = blockShadow.width / 2;
blockShadow.anchorY = blockShadow.height / 2;
blockShadow.x = -(blockShadow.width - base.width) / 2;
blockShadow.y =props.blockShadowOffset;
base.addChild(blockShadow);
const blockContainer = this.blockContainer = new engine.Container(); const blockContainer = this.blockContainer = new engine.Container();
frontContainer.addChild(blockContainer); frontContainer.addChild(blockContainer);
...@@ -100,13 +90,6 @@ export default class GameView extends engine.Container { ...@@ -100,13 +90,6 @@ export default class GameView extends engine.Container {
player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this); player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this);
let playerShadow = this._playerShadow = new engine.Image(getTextureByName('玩家阴影'));
playerShadow.anchorX = playerShadow.width / 2;
playerShadow.anchorY = playerShadow.height / 2;
//playerShadow.x = frontContainer.width / 2;
playerShadow.x =this.player.x-playerShadow.width / 2;
let scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container(); let scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container();
scoreAddTipsContainer.width=750; scoreAddTipsContainer.width=750;
scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2; scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2;
...@@ -123,7 +106,7 @@ export default class GameView extends engine.Container { ...@@ -123,7 +106,7 @@ export default class GameView extends engine.Container {
scoreAddTips.x = this.player.x-scoreAddTips.width / 2; scoreAddTips.x = this.player.x-scoreAddTips.width / 2;
scoreAddTipsContainer.addChild(scoreAddTips); scoreAddTipsContainer.addChild(scoreAddTips);
frontContainer.addChild(playerShadow);
frontContainer.addChild(player); frontContainer.addChild(player);
...@@ -198,8 +181,6 @@ export default class GameView extends engine.Container { ...@@ -198,8 +181,6 @@ export default class GameView extends engine.Container {
} }
async start(revive = false) { async start(revive = false) {
this._playerShadow.y =this.player.y+props.playerShadowOffset;
this.scoreAddTipsContainer.y =this.player.y+props.scoreAddTipsOffset; this.scoreAddTipsContainer.y =this.player.y+props.scoreAddTipsOffset;
//this.setScoreText("+100") //this.setScoreText("+100")
if (!revive) { if (!revive) {
...@@ -369,7 +350,6 @@ export default class GameView extends engine.Container { ...@@ -369,7 +350,6 @@ export default class GameView extends engine.Container {
clearInterval(this.timer); clearInterval(this.timer);
this.currentBlock.playHit(); this.currentBlock.playHit();
this._playerShadow.visible=false;
// this.currentBlock.stop(); // this.currentBlock.stop();
// this.playHitEffect(dir); // this.playHitEffect(dir);
await this.player.hitAway(dir); await this.player.hitAway(dir);
...@@ -384,7 +364,6 @@ export default class GameView extends engine.Container { ...@@ -384,7 +364,6 @@ export default class GameView extends engine.Container {
if (!this._touchEnabled) { if (!this._touchEnabled) {
return; return;
} }
this._playerShadow.visible=false;
this._touchEnabled = false; this._touchEnabled = false;
this.playOpenGoldBag(); this.playOpenGoldBag();
const result: any = await this.player.jump(); const result: any = await this.player.jump();
...@@ -410,9 +389,8 @@ export default class GameView extends engine.Container { ...@@ -410,9 +389,8 @@ export default class GameView extends engine.Container {
this.currentBlock.playProFect(); this.currentBlock.playProFect();
} }
if(type!=3){ if(type!=3){
this._playerShadow.visible=true;
} }
this._playerShadow.y=this.player.y+props.playerShadowOffset;
this.player.playLand(type, this.currentBlock.dir); this.player.playLand(type, this.currentBlock.dir);
this.currentBlock.stop(); this.currentBlock.stop();
...@@ -425,9 +403,6 @@ export default class GameView extends engine.Container { ...@@ -425,9 +403,6 @@ export default class GameView extends engine.Container {
}); });
this.addBlock(); this.addBlock();
// this.frontContainer.addChild(this._playerShadow);
//this._playerShadow.y=this.player.y+props.playerShadowOffset;
} }
this._touchEnabled = true; this._touchEnabled = true;
} }
......
...@@ -27,7 +27,6 @@ export default class Player extends engine.Container { ...@@ -27,7 +27,6 @@ export default class Player extends engine.Container {
private aboveBlock; private aboveBlock;
private _aniName; private _aniName;
playerShadow;
private _currentAni: svga.Svga; private _currentAni: svga.Svga;
private _prefectLandCounting; private _prefectLandCounting;
......
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