TVScrollParameter.js 1.69 KB
cc.Class({
    extends: cc.Component,

    properties: {
        _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;
    }
});