|
|
@@ -32,6 +32,10 @@ cc.Class({
|
|
|
sportsHall:cc.Node,
|
|
|
dzyyHall:cc.Node,
|
|
|
buyuHall:cc.Node,
|
|
|
+ Gundong:cc.Label,
|
|
|
+ GundongMask:cc.Mask,
|
|
|
+ Gundong1:cc.Layout,
|
|
|
+ GundongMask1:cc.Mask,
|
|
|
},
|
|
|
|
|
|
onLoad()
|
|
|
@@ -55,13 +59,15 @@ cc.Class({
|
|
|
this.sportsHall.active = false
|
|
|
this.dzyyHall.active = false
|
|
|
this.buyuHall.active = false
|
|
|
- this.show()
|
|
|
+ this.playShow()
|
|
|
// this.animation = this.nvren.getComponent(cc.Animation);
|
|
|
|
|
|
// this.animation.on('finished', this.onGuideFinished, this);
|
|
|
// this.animation.play('nrcome1');
|
|
|
var self = this
|
|
|
-
|
|
|
+ this.gundongText()
|
|
|
+ // this.gundongText2()
|
|
|
+ this.dtNum = 0
|
|
|
},
|
|
|
onGuideFinished(){
|
|
|
console.log("onGuideFinished--------------------")
|
|
|
@@ -91,6 +97,58 @@ cc.Class({
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ gundongText:function(){
|
|
|
+ var self = this;
|
|
|
+ setTimeout(function(){
|
|
|
+ // var notifyRes = JSON.parse(cc.sys.localStorage.getItem('notify'));
|
|
|
+ // var gundongNode = cc.find("Canvas/gundong");
|
|
|
+ // if(notifyRes != null){
|
|
|
+ // if(gundongNode){
|
|
|
+ // gundongNode.active = true;
|
|
|
+ // }
|
|
|
+ // self.Gundong.string = notifyRes;
|
|
|
+ // }else{
|
|
|
+ // if(gundongNode){
|
|
|
+ // gundongNode.active = false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ var text = self.Gundong;
|
|
|
+ var width = self.GundongMask.node.width;
|
|
|
+ text.node.runAction(cc.repeatForever(cc.sequence(
|
|
|
+ cc.moveTo(text.node.width/width*10,cc.p(-text.node.width-width/5,text.node.y)),
|
|
|
+ cc.callFunc(function(){
|
|
|
+ text.node.x = width;
|
|
|
+ }))));
|
|
|
+ },300);
|
|
|
+ },
|
|
|
+
|
|
|
+ gundongText2:function(){
|
|
|
+ var self = this;
|
|
|
+ setTimeout(function(){
|
|
|
+ // var notifyRes = JSON.parse(cc.sys.localStorage.getItem('notify'));
|
|
|
+ // var gundongNode = cc.find("Canvas/gundong");
|
|
|
+ // if(notifyRes != null){
|
|
|
+ // if(gundongNode){
|
|
|
+ // gundongNode.active = true;
|
|
|
+ // }
|
|
|
+ // self.Gundong.string = notifyRes;
|
|
|
+ // }else{
|
|
|
+ // if(gundongNode){
|
|
|
+ // gundongNode.active = false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ var text = self.Gundong1;
|
|
|
+ var height = self.GundongMask1.node.height;
|
|
|
+ text.node.runAction(cc.repeatForever(cc.sequence(
|
|
|
+ cc.moveTo(1,cc.p(text.node.x,text.node.y+57)),
|
|
|
+ cc.callFunc(function(){
|
|
|
+ if (text.node.height == Math.abs(text.node.y)+17) {
|
|
|
+ text.node.y = 17;
|
|
|
+ }
|
|
|
+ }))));
|
|
|
+ },300);
|
|
|
+ },
|
|
|
+
|
|
|
start()
|
|
|
{
|
|
|
// this.preloadManager = new PreloadManager();
|
|
|
@@ -115,6 +173,20 @@ cc.Class({
|
|
|
|
|
|
update(dt)
|
|
|
{
|
|
|
+ this.dtNum += dt
|
|
|
+ if (this.dtNum >=2) {
|
|
|
+ var text = this.Gundong1;
|
|
|
+ // var height = this.GundongMask1.node.height;
|
|
|
+ text.node.runAction(cc.sequence(
|
|
|
+ cc.moveTo(1,cc.p(text.node.x,text.node.y+50)),
|
|
|
+ cc.callFunc(function(){
|
|
|
+ if (text.node.height <= Math.abs(text.node.y)+13) {
|
|
|
+ text.node.y = 13;
|
|
|
+ }
|
|
|
+ })));
|
|
|
+ this.dtNum =0
|
|
|
+ }
|
|
|
+ console.log("time is:",dt)
|
|
|
// if (this.progressBar.progress < this.progressBarTarget)
|
|
|
// {
|
|
|
// this.progressBar.progress += dt*this.scale
|
|
|
@@ -124,6 +196,7 @@ cc.Class({
|
|
|
// } else if (this.progressBarTarget >= 5 / 6 && this.bloaded && this.loginLogic.needShowAuth == false) {
|
|
|
// this.onResourcesLoaded();
|
|
|
// }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
clickWXLogin(sender)
|
|
|
@@ -190,7 +263,7 @@ cc.Class({
|
|
|
display(){
|
|
|
var animation = this.hallsBtns.getComponent(cc.Animation);
|
|
|
var hallsGoFinished = function(){
|
|
|
- this.showingHall.playShow()
|
|
|
+ this.showingHall.playShow(this)
|
|
|
this.hallsBtns._parent._parent.active = false
|
|
|
};
|
|
|
animation.on('finished', hallsGoFinished, this);
|
|
|
@@ -199,11 +272,10 @@ cc.Class({
|
|
|
},
|
|
|
clickReturnBtn(){
|
|
|
if (this.showingHall) {
|
|
|
- this.showingHall.playEnd(this)
|
|
|
- this.showingHall = null
|
|
|
+ this.showingHall.playEnd(true)
|
|
|
}
|
|
|
},
|
|
|
- show(param)
|
|
|
+ playShow(param)
|
|
|
{
|
|
|
this.hallsBtns._parent._parent.active = true
|
|
|
this.animation = this.nvren.getComponent(cc.Animation);
|
|
|
@@ -214,6 +286,9 @@ cc.Class({
|
|
|
|
|
|
this.animation.on('finished', this.onGuideFinished, this);
|
|
|
this.animation.play('nrcome1');
|
|
|
+ },
|
|
|
+ setShowingHall(Hall){
|
|
|
+ this.showingHall = Hall==this?null:Hall
|
|
|
}
|
|
|
});
|
|
|
|