Commit ad0ce13a authored by Chen Jiping's avatar Chen Jiping

完善

parent 21ab0225
......@@ -11,6 +11,12 @@
@font-face
{
font-family: 'BRLNSDB_1';
src: url("../../assets/font/BRLNSDB_1.TTF") ;
}
@font-face
{
font-family: 'BRLNSDB';
......
......@@ -58,6 +58,10 @@ export class PlayComponent implements OnInit, OnDestroy {
renderArr;
prompt;
prompt_val;
//子弹渲染
bulletRenderArr;
......@@ -87,6 +91,8 @@ export class PlayComponent implements OnInit, OnDestroy {
weapon_fire_pic
//当前练习题答案:[{pic:spreat,correct:'',canHit:true|false,hited:true|false,show:true|false}]
curanswers = []
......@@ -804,6 +810,33 @@ export class PlayComponent implements OnInit, OnDestroy {
this.initTopPart();
this.initPrompt();
}
initPrompt(){
//显示练习题剩余提示
const prompt = new MySprite();
prompt.init(this.images.get('prompt'));
prompt.setScaleXY(this.mapScale);
prompt.y = -prompt.height;
prompt.x = -prompt.width;
this.prompt = prompt;
let prompt_val = new Label();
prompt_val.text = "";
prompt_val.textAlign='middle';
prompt_val.fontSize = 100;
prompt_val.fontName = "BRLNSDB_1";
prompt_val.fontColor = "#FFFFFF";
prompt_val.refreshSize();
prompt_val.x = -prompt_val.width/2;
prompt_val.y = 0;
prompt.addChild(prompt_val);
this.prompt_val = prompt_val;
prompt.childDepandAlpha = true;
}
initTopPart() {
......@@ -844,6 +877,8 @@ export class PlayComponent implements OnInit, OnDestroy {
initPic() {
const maxW = this.canvasWidth;
const bg_pic = new MySprite();
......@@ -1444,7 +1479,8 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout(() => {
tweenChange(cover, {alpha: 0}, 6, ()=>{
this.prompt.x = -(this.prompt.width + 100);
this.prompt.y = -this.prompt.height - 100;
this.initPracticePic();
});
}, 6000);
......@@ -1459,27 +1495,16 @@ export class PlayComponent implements OnInit, OnDestroy {
* 显示练习题结束提示
*/
showPrompt(){
//显示练习题剩余提示
const prompt = new MySprite();
prompt.init(this.images.get('prompt'));
prompt.setScaleXY(this.mapScale);
prompt.y = this.canvasHeight/2;
prompt.x = this.canvasWidth/2;
this.endPageArr.push(prompt);
let prompt_val = new Label();
prompt_val.text = (this.nextPracticeIndex + 1) + " / " + this.data.practices.length;
prompt_val.textAlign='middle';
prompt_val.fontSize = 100;
prompt_val.fontName = "BRLNSDB";
prompt_val.fontColor = "#FFFFFF";
prompt_val.refreshSize();
//显示练习题剩余提示
this.prompt.y = this.canvasHeight/2;
this.prompt.x = this.canvasWidth/2;
this.endPageArr.push(this.prompt);
prompt_val.x = -prompt_val.width/2;
prompt_val.y = 0;
prompt.addChild(prompt_val);
prompt.childDepandAlpha = true;
this.prompt_val.text = (this.nextPracticeIndex + 1) + " / " + this.data.practices.length;
this.prompt_val.refreshSize();
this.prompt_val.x = -this.prompt_val.getBoundingBox().width/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