| 123456789101112131415161718192021222324252627282930 |
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- start () {
- },
- onCollisionEnter: function (other)
- {
- if(other.node.name === 'PlayerCollisionLine')
- {
- var Level = this.node.parent.parent;
- var Canvas = Level.getComponent('LevelControl').Canvas;
- var GameStates = Canvas.getComponent('GameStates');
- other.node.parent.parent.getComponent('HeroControl').ResetSpeed();
- }
- },
- onCollisionStay: function (other) {
- // console.log('on collision stay');
- },
- onCollisionExit: function (other) {
- }
- // update (dt) {},
- });
|