var playerConfig = require("../PlayerConfig.js"); 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; //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.nextHandrail = null; } });