const PlayerStateStatic = require('PlayerState');
var BarrierSuperClass = require("BarrierSuper");
cc.Class({
    extends:BarrierSuperClass,

    properties: {
    },
    start () {

    },
    onCollisionEnter: function (other) {

        if(other.node.name === 'PlayerCollisionLine')
        {
            var PlayerCollisionLine = other.getComponent("PlayerCollisionLine");
            var PlayerStateScript = PlayerCollisionLine.Hero.getComponent("PlayerState");
            PlayerStateScript.CurrentInZoneType = PlayerStateStatic.ZoneType.FrontLongAccelerationBand;
            // cc.log("进 长加速带",PlayerStateScript.CurrentInZoneType);
        }
    },
    onCollisionStay: function (other) {

    },
    onCollisionExit: function (other) {
        if(other.node.name === 'PlayerCollisionLine') {
            var PlayerCollisionLine = other.getComponent("PlayerCollisionLine");
            var PlayerStateScript = PlayerCollisionLine.Hero.getComponent("PlayerState");
            PlayerStateScript.CurrentInZoneType = PlayerStateStatic.ZoneType.CenterLongAccelerationBand;
            // cc.log("出 长加速带",PlayerStateScript.CurrentInZoneType);
        }
    }
});
