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

    properties: {
        time : 2000

    },
    onLoad : function () {
        // this.tag = true;
    },
    onCollisionEnter: function (other)
    {
        if(other.node.name === 'PlayerCollisionLine')
        {
            // var Hero = cc.find("Hero");
            var HeroControl = other.node.parent.parent.getComponent("HeroControl");
            HeroControl.WriggleMove();

            // HeroControl.PlayerStateScript.CurrentSpeed = 100;
            // HeroControl.acceleration = 1000;
            // HeroControl.EnableHeroMoving(false);
            // cc.log("速度 减速 调用",other.node.parent.parent.name);
        }

    },
    onCollisionStay: function (other) {
        // console.log('on collision stay');
    },
    onCollisionExit: function (other) {

    },
    CollisionEnter: function (other)
    {
        if(other.node.name === 'PlayerCollisionLine')
        {
            // var Hero = cc.find("Hero");
            var HeroControl = other.node.parent.parent.getComponent("HeroControl");
            // HeroControl.WriggleMove(this.time);
            // cc.log("速度 减速 调用");
        }

    }
});
