|
@@ -62,6 +62,8 @@ cc.Class({
|
|
|
|
|
|
|
|
this.returnNode.active =false
|
|
this.returnNode.active =false
|
|
|
this.shareNode.active =true
|
|
this.shareNode.active =true
|
|
|
|
|
+ this.hallListBtn.active = false
|
|
|
|
|
+ // this.halllist.active = false
|
|
|
// this.playShow()
|
|
// this.playShow()
|
|
|
// this.animation = this.nvren.getComponent(cc.Animation);
|
|
// this.animation = this.nvren.getComponent(cc.Animation);
|
|
|
|
|
|
|
@@ -143,7 +145,7 @@ cc.Class({
|
|
|
var text = self.Gundong;
|
|
var text = self.Gundong;
|
|
|
var width = self.GundongMask.node.width;
|
|
var width = self.GundongMask.node.width;
|
|
|
text.node.runAction(cc.repeatForever(cc.sequence(
|
|
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.moveTo(text.node.width/width*10,cc.v2(-text.node.width-width/5,text.node.y)),
|
|
|
cc.callFunc(function(){
|
|
cc.callFunc(function(){
|
|
|
text.node.x = width;
|
|
text.node.x = width;
|
|
|
}))));
|
|
}))));
|
|
@@ -168,7 +170,7 @@ cc.Class({
|
|
|
var text = self.Gundong1;
|
|
var text = self.Gundong1;
|
|
|
var height = self.GundongMask1.node.height;
|
|
var height = self.GundongMask1.node.height;
|
|
|
text.node.runAction(cc.repeatForever(cc.sequence(
|
|
text.node.runAction(cc.repeatForever(cc.sequence(
|
|
|
- cc.moveTo(1,cc.p(text.node.x,text.node.y+57)),
|
|
|
|
|
|
|
+ cc.moveTo(1,cc.v2(text.node.x,text.node.y+57)),
|
|
|
cc.callFunc(function(){
|
|
cc.callFunc(function(){
|
|
|
if (text.node.height == Math.abs(text.node.y)+17) {
|
|
if (text.node.height == Math.abs(text.node.y)+17) {
|
|
|
text.node.y = 17;
|
|
text.node.y = 17;
|
|
@@ -206,7 +208,7 @@ cc.Class({
|
|
|
var text = this.Gundong1;
|
|
var text = this.Gundong1;
|
|
|
// var height = this.GundongMask1.node.height;
|
|
// var height = this.GundongMask1.node.height;
|
|
|
text.node.runAction(cc.sequence(
|
|
text.node.runAction(cc.sequence(
|
|
|
- cc.moveTo(1,cc.p(text.node.x,text.node.y+50)),
|
|
|
|
|
|
|
+ cc.moveTo(1,cc.v2(text.node.x,text.node.y+50)),
|
|
|
cc.callFunc(function(){
|
|
cc.callFunc(function(){
|
|
|
if (text.node.height <= Math.abs(text.node.y)+13) {
|
|
if (text.node.height <= Math.abs(text.node.y)+13) {
|
|
|
text.node.y = 13;
|
|
text.node.y = 13;
|
|
@@ -268,22 +270,28 @@ cc.Class({
|
|
|
|
|
|
|
|
clickHall(sender,customEventData){
|
|
clickHall(sender,customEventData){
|
|
|
this.showingHall = this.myhallMap.get(customEventData)
|
|
this.showingHall = this.myhallMap.get(customEventData)
|
|
|
|
|
+ this.showingHall.parentScene = this
|
|
|
|
|
+ this.showingHall.initScene()
|
|
|
this.setHalllist(customEventData)
|
|
this.setHalllist(customEventData)
|
|
|
this.display()
|
|
this.display()
|
|
|
},
|
|
},
|
|
|
clickHallList(sender,customEventData){
|
|
clickHallList(sender,customEventData){
|
|
|
- var nextScense = this.myhallMap.get(customEventData)
|
|
|
|
|
|
|
+ var nextScene = this.myhallMap.get(customEventData)
|
|
|
|
|
+ nextScene.initScene()
|
|
|
|
|
+ nextScene.parentScene = this
|
|
|
this.setHalllist(customEventData)
|
|
this.setHalllist(customEventData)
|
|
|
- if (nextScense) {
|
|
|
|
|
- this.showingHall.playEnd('horizontal',nextScense)
|
|
|
|
|
|
|
+ if (nextScene) {
|
|
|
|
|
+ this.showingHall.playEnd(nextScene)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
display(){
|
|
display(){
|
|
|
- this.setHalllistBtnDisplay(true)
|
|
|
|
|
|
|
+ if (this.showingHall.SceneLevel == 1) {
|
|
|
|
|
+ this.setHalllistBtnDisplay(true)
|
|
|
|
|
+ }
|
|
|
var animation = this.hallsBtns.getComponent(cc.Animation);
|
|
var animation = this.hallsBtns.getComponent(cc.Animation);
|
|
|
var hallsGoFinished = function(){
|
|
var hallsGoFinished = function(){
|
|
|
- this.showingHall.playShow(this)
|
|
|
|
|
|
|
+ this.showingHall.playShow(this.setShowingHall)
|
|
|
this.hallsBtns._parent._parent.active = false
|
|
this.hallsBtns._parent._parent.active = false
|
|
|
};
|
|
};
|
|
|
animation.on('finished', hallsGoFinished, this);
|
|
animation.on('finished', hallsGoFinished, this);
|
|
@@ -292,7 +300,7 @@ cc.Class({
|
|
|
},
|
|
},
|
|
|
clickReturnBtn(){
|
|
clickReturnBtn(){
|
|
|
if (this.showingHall) {
|
|
if (this.showingHall) {
|
|
|
- this.showingHall.playEnd('up')
|
|
|
|
|
|
|
+ this.showingHall.playEnd()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
playShow(param)
|
|
playShow(param)
|
|
@@ -310,9 +318,13 @@ cc.Class({
|
|
|
this.animation.play('nrcome1');
|
|
this.animation.play('nrcome1');
|
|
|
},
|
|
},
|
|
|
setShowingHall(Hall){
|
|
setShowingHall(Hall){
|
|
|
- this.showingHall = Hall==this?null:Hall
|
|
|
|
|
|
|
+ this.showingHall = Hall
|
|
|
this.returnNode.active =Hall!=this
|
|
this.returnNode.active =Hall!=this
|
|
|
this.shareNode.active =Hall==this
|
|
this.shareNode.active =Hall==this
|
|
|
|
|
+ if (this.halllist.moved) {
|
|
|
|
|
+ this.setHalllistDisplay(!this.halllist.moved)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.setHalllistBtnDisplay(this.showingHall.SceneLevel ==1 && !this.halllist.moved)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
setHalllistBtnDisplay(display){
|
|
setHalllistBtnDisplay(display){
|
|
@@ -327,7 +339,7 @@ cc.Class({
|
|
|
setHalllistDisplay(display)
|
|
setHalllistDisplay(display)
|
|
|
{
|
|
{
|
|
|
if (this.halllist.moved!=display) {
|
|
if (this.halllist.moved!=display) {
|
|
|
- var actionTo1 = display?cc.moveBy(0.3, cc.v2(340, 0)):cc.moveBy(0.3, cc.v2(-340, 0));
|
|
|
|
|
|
|
+ var actionTo1 = display?cc.moveBy(0.3, cc.v2(367, 0)):cc.moveBy(0.3, cc.v2(-367, 0));
|
|
|
this.halllist.runAction(actionTo1)
|
|
this.halllist.runAction(actionTo1)
|
|
|
this.halllist.moved = display
|
|
this.halllist.moved = display
|
|
|
}
|
|
}
|