Commit 55a4fa00 authored by wildfirecode's avatar wildfirecode

1

parent 03ba3a08
node_modules
\ No newline at end of file
......@@ -1582,7 +1582,7 @@ var MConst;
width: 750,
height: 1624
};
MConst.GroundLine = 1110;
MConst.GroundLine = 1110 + 150;
MConst.BulletFireSpeed = {
min: 10,
max: 20
......@@ -4211,7 +4211,7 @@ exports.ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/kickball-feile/1593417124/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/kickball-feile/1593423717/resource/"
};
......@@ -5971,6 +5971,7 @@ var SoundMgr_1 = __webpack_require__(/*! ../Mgr/SoundMgr */ "./src/Mgr/SoundMgr.
var TextureMgr_1 = __webpack_require__(/*! ../Mgr/TextureMgr */ "./src/Mgr/TextureMgr.ts");
var Collider_1 = __webpack_require__(/*! ./Collider */ "./src/game/Collider.ts");
var MoveObject_1 = __webpack_require__(/*! ./MoveObject */ "./src/game/MoveObject.ts");
var DxqPlayScene_1 = __webpack_require__(/*! ./DxqPlayScene */ "./src/game/DxqPlayScene.ts");
var tempPower = null;
var tempIndexOffset = null;
var imageNames = [
......@@ -6010,7 +6011,6 @@ var Ball = (function (_super) {
var bitmapHeight = textureSize.height * scaleRatio;
_this.bitmap = new FYGE.Sprite();
_this.addChild(_this.bitmap);
console.log(_this.name);
_this.bitmap.width = bitmapWidth;
_this.bitmap.height = bitmapHeight;
_this.anchorX = bitmapWidth / 2;
......@@ -6022,7 +6022,7 @@ var Ball = (function (_super) {
textures[i] = RES_1.RES.getRes("ball_num_" + i + ".png");
textures['k'] = RES_1.RES.getRes("ball_num_k.png");
var labelScore2 = new FYGE.BitmapText(textures);
labelScore2.textAlign = FYGE.TEXT_ALIGN.LEFT;
labelScore2.textAlign = FYGE.TEXT_ALIGN.CENTER;
labelScore2.scaleX = labelScore2.scaleY = scaleRatio;
_this.addChild(labelScore2);
var textures2 = {};
......@@ -6030,7 +6030,7 @@ var Ball = (function (_super) {
textures2[i] = RES_1.RES.getRes("ball_num_black_" + i + ".png");
textures2['k'] = RES_1.RES.getRes("ball_num_black_k.png");
var labelScore3 = new FYGE.BitmapText(textures2);
labelScore3.textAlign = FYGE.TEXT_ALIGN.LEFT;
labelScore3.textAlign = FYGE.TEXT_ALIGN.CENTER;
labelScore3.scaleX = labelScore3.scaleY = scaleRatio;
_this.addChild(labelScore3);
var collider = _this.addComponent(Collider_1.CircleCollider);
......@@ -6086,6 +6086,7 @@ var Ball = (function (_super) {
else {
this.labelScorewhite.visible = true;
}
console.log('ball score', score, 'colorIndex', colorIndex);
this.initScore = score;
this.score = score;
this.physics.rotateVelocity = direction * MConst_1.MConst.BallRotateSpeed * Math.pow(1 / this.scaleRatio, 0.5);
......@@ -6099,7 +6100,7 @@ var Ball = (function (_super) {
else if (dir == -1) {
this.x = MConst_1.MConst.DesignResolution.width + this.width / 2 + 10;
}
this.y = MConst_1.MConst.BallInitPosY;
this.y = MConst_1.MConst.BallInitPosY + DxqPlayScene_1.default.OFFSET_Y;
this.physics.velocity.x = this.getRandomVelocityX(dir) + 1 * dir;
this.dir = dir;
this.physics.onMoved = this.onBornStageMoved.bind(this);
......@@ -6184,23 +6185,19 @@ var Ball = (function (_super) {
};
Ball.prototype.updateScoreLabel = function () {
if (this.scoreUpdateFlag == true) {
var labelScore21white_1 = this.labelScorewhite;
var labelScoreBlack_1 = this.labelScoreBlack;
var labelScore21white = this.labelScorewhite;
var labelScoreBlack = this.labelScoreBlack;
var score = this.score;
if (score >= 1000) {
labelScore21white_1.text = (Math.floor(score / 100) / 10).toString() + "k";
labelScoreBlack_1.text = (Math.floor(score / 100) / 10).toString() + "k";
labelScore21white.text = (Math.floor(score / 100) / 10).toString() + "k";
labelScoreBlack.text = (Math.floor(score / 100) / 10).toString() + "k";
}
else {
labelScore21white_1.text = score.toString();
labelScoreBlack_1.text = score.toString();
labelScore21white.text = score.toString();
labelScoreBlack.text = score.toString();
}
setTimeout(function () {
labelScoreBlack_1.x = -labelScore21white_1.width / 2;
labelScoreBlack_1.y = -labelScore21white_1.height / 2;
labelScore21white_1.x = -labelScore21white_1.width / 2;
labelScore21white_1.y = -labelScore21white_1.height / 2;
});
labelScoreBlack.y = -labelScore21white.height / 2;
labelScore21white.y = -labelScore21white.height / 2;
this.scoreUpdateFlag = false;
if (this.score <= 0) {
this.onScoreIsZero();
......@@ -6836,10 +6833,10 @@ var Drop = (function (_super) {
if (config.type == "power")
str = str + "%";
label.text = str;
label.fillColor = hex2string(config.textColor);
label.fillColor = hex2string(0xffffff);
label.visible = false;
label.x = texture.width + 2;
label.y = texture.height / 2 - label.height / 2;
label.x = texture.width / 2 - label.textWidth / 2;
label.y = -label.textHeight;
_this.collider.setData(texture.width / 2, texture.height / 2);
return _this;
}
......@@ -7040,7 +7037,7 @@ var DxqPlayScene = (function (_super) {
_this._boomEffectMgr = new SpBoomEffect_1.SpBoomEffectMgr();
_this._animationMgr = new FrameAnimation_1.FrameAnimationMgr();
_this._horizontalMoveMgr = new Bullet_1.HorizontalMoveMgr();
var OFFSET_Y = (1624 - layers_1.layers.stageHeight) / 2;
DxqPlayScene.OFFSET_Y = (1624 - layers_1.layers.stageHeight) / 2;
DataMgr_1.DataMgr.game = _this;
_this.initMgrs();
_this.pause = false;
......@@ -7055,33 +7052,33 @@ var DxqPlayScene = (function (_super) {
var bg = new FYGE.Sprite(RES_1.RES.getRes("main_bg.jpg"));
_this.node.addChild(bg);
var cdbg = new FYGE.Sprite(RES_1.RES.getRes("main_countdown.png"));
cdbg.position.set(612, 26 + OFFSET_Y);
cdbg.position.set(612, 26 + DxqPlayScene.OFFSET_Y);
_this.node.addChild(cdbg);
var cdbg2 = new FYGE.Sprite(RES_1.RES.getRes("main_countdown2.png"));
cdbg2.position.set(685, 61 + OFFSET_Y);
cdbg2.position.set(685, 61 + DxqPlayScene.OFFSET_Y);
cdbg2.anchorX = 6;
cdbg2.anchorY = 17;
_this.node.addChild(cdbg2);
_this.cdline = cdbg2;
var bulletIcon = new FYGE.Sprite(RES_1.RES.getRes("main_bullet.png"));
bulletIcon.position.set(30, 30 + OFFSET_Y);
bulletIcon.position.set(30, 30 + DxqPlayScene.OFFSET_Y);
_this.bulletScoreLabel = Tools_1.Tool.getText("0", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT, 500);
_this.bulletScoreLabel.x = 100;
_this.bulletScoreLabel.y = 42 + OFFSET_Y;
_this.bulletScoreLabel.y = 42 + DxqPlayScene.OFFSET_Y;
var powerIcon = new FYGE.Sprite(RES_1.RES.getRes("main_power.png"));
powerIcon.position.set(30, 30 + OFFSET_Y + 72);
powerIcon.position.set(30, 30 + DxqPlayScene.OFFSET_Y + 72);
_this.powerScoreLabel = Tools_1.Tool.getText("0%", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT, 500);
_this.powerScoreLabel.x = 100;
_this.powerScoreLabel.y = 114 + OFFSET_Y;
_this.powerScoreLabel.y = 114 + DxqPlayScene.OFFSET_Y;
var textures = {};
for (var i = 0; i < 10; i++)
textures[i] = RES_1.RES.getRes("score_num_" + i + ".png");
var labelScore2 = new FYGE.BitmapText(textures);
labelScore2.textAlign = FYGE.TEXT_ALIGN.LEFT;
labelScore2.y = OFFSET_Y + 50;
labelScore2.textAlign = FYGE.TEXT_ALIGN.CENTER;
labelScore2.y = DxqPlayScene.OFFSET_Y + 50;
_this.totalScoreLabel = labelScore2;
_this.timeLabel = Tools_1.Tool.getText("00:00", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT);
_this.timeLabel.position.set(656, 117 + OFFSET_Y);
_this.timeLabel.position.set(656, 117 + DxqPlayScene.OFFSET_Y);
_this.node.addChild(bulletIcon);
_this.node.addChild(_this.bulletScoreLabel);
_this.node.addChild(powerIcon);
......@@ -7387,11 +7384,10 @@ var DxqPlayScene = (function (_super) {
if (needSend) {
FYGE.GDispatcher.dispatchEvent("game-update", updateData);
this.powerScoreLabel.text = updateData.powerScore + "%";
this.bulletScoreLabel.text = "x" + updateData.bulletScore;
this.bulletScoreLabel.text = "" + updateData.bulletScore;
this.totalScoreLabel.text = updateData.score + "";
console.log('this.totalScoreLabel.text', this.totalScoreLabel.text);
setTimeout(function () {
_this.totalScoreLabel.x = 750 / 2 - _this.totalScoreLabel.width / 2;
_this.totalScoreLabel.x = 750 / 2;
});
}
};
......
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