TVScrollParameter.js
2.33 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
81
82
83
84
85
86
87
88
89
90
91
92
93
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
_fStep:1,
_bHasRelation:true,
_oNode:null, //deprecated
_iDirection:0,
_fTargetPosition:0,
},
//ctor: function (fStep,bHasRelation,iDirection) {
ctor: function () {
this._fStep=arguments[0];
this._bHasRelation=arguments[1];
//this._oNode=arguments[2];
this._iDirection=arguments[2];
//this._fStep=fStep;
//this._bHasRelation=bHasRelation;
//this._oNode=oNode;
//this._iDirection=iDirection;
},
init: function (fStep,bHasRelation,iDirection) {
this._fStep=fStep;
this._bHasRelation=bHasRelation;
//this._oNode=oNode;
this._iDirection=iDirection;
},
getStep:function(){
return this._fStep;
},
setStep:function(fStep){
this._fStep=fStep;
},
getHasRelation:function(){
return this._bHasRelation;
},
setHasRelation:function(bHasRelation){
this._bHasRelation=bHasRelation;
},
/*
getNode:function(){
return this._oNode;
},
setNode:function(oNode){
this._oNode=oNode;
},*/
getDirection:function(){
return this._iDirection;
},
setDirection:function(iDirection){
this._iDirection=iDirection;
},
getTargetNode:function(){
return this._oTargetNode;
},
setTargetNode:function(oTargetNode){
this._oTargetNode=oTargetNode;
},
//明确目标位置 比设置Step更为有效
getTargetPosition:function(){
return this._fTargetPosition;
},
setTargetPosition:function(fTargetPosition){
this._fTargetPosition=fTargetPosition;
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});