Application.js
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cc.Class({
extends: cc.Component,
properties: {
//键值由具体场景决定
_aSceneContext:{default:[]},
/*
{
categoryId:123,
history:[]
}
/*/
_aSceneParameter:{default:[]},
_bBackStatus:false,
_iDefaultCollectionId:-1,
_iTotalFrames:0,
},
// use this for initialization
onLoad: function () {
this._aSceneContext=[];
this._aSceneParameter=[];
},
getSceneContext:function(){
return this._aSceneContext;
},
popSceneContext:function(){
return this._aSceneContext.pop();
},
getTopSceneContext:function(){
return this._aSceneContext[this._aSceneContext.length-1];
},
setSceneContext:function(aSceneContext){
this._aSceneContext=aSceneContext;
},
getSceneParameter:function(){
return this._aSceneParameter;
},
popSceneParameter:function(){
return this._aSceneParameter.pop();
},
getTopSceneParameter:function(){
return this._aSceneParameter[this._aSceneParameter.length-1];
},
setSceneParameter:function(aSceneParameter){
this._aSceneParameter=aSceneParameter;
},
getBackStatus:function(){
return this._bBackStatus;
},
setBackStatus:function(bBackStatus){
this._bBackStatus=bBackStatus;
},
getDefaultCollectionId:function(){
return this._iDefaultCollectionId;
},
setDefaultCollectionId:function(iCollectionId){
this._iDefaultCollectionId=iCollectionId;
},
setTotalFrames:function(iFrames){
this._iTotalFrames=iFrames;
},
getTotalFrames:function(){
return this._iTotalFrames;
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});