const GameStatesStatic = require('GameStates');
const StartLine = require('StartLine');
cc.Class({
    extends:StartLine,

    properties: {

    },
    start () {
        // cc.log('x===='+this.node.convertToWorldSpaceAR(cc.Vec2.ZERO).x);
        var Hero = cc.find('Hero');
        // var Rivel = cc.find('Rivel');
        var HeroPlayerState = Hero.getComponent("PlayerState");
        // var RivelPlayerState = Rivel.getComponent("PlayerState");
        var data = {
            x : this.node.convertToWorldSpaceAR(cc.Vec2.ZERO).x,
            type : GameStatesStatic.GameProgress.LongJump
        };
        HeroPlayerState.StartLineStopPositionArray.push(data);
        // RivelPlayerState.StartLineStopPositionArray.push(this.node.convertToWorldSpaceAR(cc.Vec2.ZERO).x);
    },
    //跳远 开始起点
    onCollisionEnter: function (other)
    {
        this._super(other);
        if(other.node.name === 'PlayerCollisionLine')
        {
            cc.find('Canvas').getComponent('GameStates').CurrentProgress = GameStatesStatic.GameProgress.LongJump;
            cc.find('Canvas').getComponent('GameStates').strCureentLevel = 'LongJump';
        }
    },
});
