Commit ad0ce13a authored by Chen Jiping's avatar Chen Jiping

完善

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