| 1234567891011121314151617181920212223242526272829303132 |
- const PlayerStateStatic = require('PlayerState');
- var BarrierSuperClass = require("BarrierSuper");
- cc.Class({
- extends:BarrierSuperClass,
- properties: {
- },
- onCollisionEnter: function (other) {
- // cc.log(other.node.name+'Enter');
- if(other.node.name === 'PlayerCollisionLine')
- {
- var PlayerCollisionLine = other.getComponent("PlayerCollisionLine");
- var PlayerStateScript = PlayerCollisionLine.node.parent.parent.getComponent("PlayerState");
- PlayerStateScript.CurrentInZoneType = PlayerStateStatic.ZoneType.AccelerationBandCenter;
- PlayerStateScript.AccelerationBandCenterTouched = this;
- // cc.log(PlayerStateScript.CurrentInZoneType );
- }
- if(other.node.name === 'LocationLine')
- {
- this.node.getComponent(cc.Sprite).destroy();
- }
- },
- onCollisionStay: function (other) {
- // console.log('on collision stay');
- },
- onCollisionExit: function (other) {
- },
- });
|