| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- cc.Class({
- extends: cc.Component,
- properties: {
- GameOverPage:{
- default: null,
- type: cc.Node
- },
- ChooseDimensionPage: {
- default: null,
- type: cc.Node
- },
- GameResult:{
- default: null,
- type: cc.Node
- },
- },
- start () {
- },
- ReplayBtnOnClick(){
- this.ChooseDimensionPage.active = true;
- this.GameOverPage.active = false;
- },
- SetGameResut(TimingNum,TimingText){
- var TimeTitle = '';
- if(TimingNum<=5){
- TimeTitle='记忆大师'
- }else if(TimingNum>=6&&TimingNum<=12){
- TimeTitle='技高一等'
- }else if(TimingNum>=13&&TimingNum<=20){
- TimeTitle='机智过人'
- }else if(TimingNum>=21&&TimingNum<=30){
- TimeTitle='过目不忘'
- }else if(TimingNum>30){
- TimeTitle='技不如人'
- }
- var ResultText = TimingText+'挑战成功\n' +
- '获得【'+TimeTitle+'】称号';
- this.GameResult.getChildByName('ResultText').getComponent(cc.Label).string = ResultText;
- }
- });
|