|
@@ -34,6 +34,7 @@ export class base_view extends Component {
|
|
|
@property(Node) top_node:Node = null;
|
|
|
@property(Node) lab_time_count:Node = null;
|
|
|
@property(Node) clock_ani:Node = null;
|
|
|
+ @property(Node) lab_countdown_time:Node = null;
|
|
|
protected guid_view:Node = null;
|
|
|
protected time_count:number = 0;
|
|
|
protected time_all_count:number = 0;
|
|
@@ -110,6 +111,9 @@ export class base_view extends Component {
|
|
|
if(this.lab_time_count!=null){
|
|
|
this.lab_time_count.getComponent(Label).string = ""
|
|
|
}
|
|
|
+ if(this.lab_countdown_time!=null){
|
|
|
+ this.lab_countdown_time.getComponent(Label).string = ""
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
下一关 start
|
|
@@ -171,7 +175,7 @@ export class base_view extends Component {
|
|
|
return
|
|
|
}
|
|
|
this.time_all_count = time;
|
|
|
- this.lab_time_count.active = true;
|
|
|
+ // this.lab_time_count.active = true;
|
|
|
|
|
|
let self = this;
|
|
|
this.time_count = 0;
|
|
@@ -189,15 +193,21 @@ export class base_view extends Component {
|
|
|
if(self.time_count<self.time_all_count){
|
|
|
self.time_count+=1;
|
|
|
if(this.categoryid===config.PLAY_TYPE.JI_YI_LI){
|
|
|
- self.lab_time_count.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
+ // self.lab_time_count.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
+ self.lab_countdown_time.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
}else{
|
|
|
self.progressbar.progress = (self.time_all_count-self.time_count)/self.time_all_count;
|
|
|
- self.lab_time_count.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
+ // self.lab_time_count.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
+ self.lab_countdown_time.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
self.clock_ani.getComponent(clock_angle).addSecond();
|
|
|
+ // tween(self.lab_countdown_time).to(0.8,{scale: new Vec3(2, 2, 1)}).call(()=>{
|
|
|
+ // self.lab_countdown_time.scale = new Vec3(1,1,1)
|
|
|
+ // }).start()
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
- self.lab_time_count.getComponent(Label).string = "0s";
|
|
|
+ // self.lab_time_count.getComponent(Label).string = "0s";
|
|
|
+ self.lab_countdown_time.getComponent(Label).string = "0s";
|
|
|
if(this.categoryid===config.PLAY_TYPE.JI_YI_LI){
|
|
|
self.showQuestion()
|
|
|
}else{
|
|
@@ -211,9 +221,11 @@ export class base_view extends Component {
|
|
|
let self = this;
|
|
|
if( (self.time_count + self.m_data.wrong_time) >= self.time_all_count){
|
|
|
self.time_all_count = 0;
|
|
|
- self.lab_time_count.getComponent(Label).string = "0s";
|
|
|
+ // self.lab_time_count.getComponent(Label).string = "0s";
|
|
|
+ self.lab_countdown_time.getComponent(Label).string = "0s";
|
|
|
}else{
|
|
|
- self.lab_time_count.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
+ // self.lab_time_count.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
+ self.lab_countdown_time.getComponent(Label).string = `${this.time_all_count-this.time_count}s`
|
|
|
self.time_count += self.m_data.wrong_time;
|
|
|
}
|
|
|
self.progressbar.progress = (self.time_all_count-self.time_count)/self.time_all_count;
|