var BasePlayerConfig = require("./BasePlayerConfig");
var playerConfig = new BasePlayerConfig();
cc.Class({
    extends: cc.Component,

    properties: {
        bMain: {
            default: false,
        },
    },
    onLoad() {
        this.init();
    },
    init()
    {
        this.playerAnimState = {
            default: 0,
            idle: 1,
            run: 2,
            jump: 3,
            stagger:4,
        };

        //playerProgressStates
        this.pProStates = {
            default: 0,
            gaming: 1,
            intoEnd: 2,
            end: 3,
        };
        //currentProgressState
        this.currentProState = this.pProStates.default;

        this.currentState = this.playerAnimState.idle;
        this.currentSpeed = playerConfig.playerSpeedGrade.idle;
        this.futureSpeed = playerConfig.playerSpeedGrade.idle;
        this.lastSpeed = playerConfig.playerSpeedGrade.idle;
        this.targetMovePos = 0;
        this.restMovePos = 0;
        //next change map target position x
        this.targetPoint = 360;
        //SpeedGrade for change running state animation
        this.currentSpeedGrade = playerConfig.playerSpeedGrade.idle;

        this.passedHurdrailNum = 0;

        this.handrailArr = [];
        this.currentHandrailIndex = 0;
        this.drawedhandrailArr = [];
        this.nextHandrail = null;

        this.actionArr = [];
        //跳跃在空中的时间
        this.jumpDuration = 1;
    }
});
