| 123456789101112131415161718192021222324252627282930313233 |
- const GameStatesStatic = require('GameStates');
- 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');
- GameStates.CurrentProgress = GameStatesStatic.GameProgress.Hurdle;
- // cc.log('Hur='+GameStates.CurrentProgress);
- }
- },
- onCollisionStay: function (other) {
- // console.log('on collision stay');
- },
- onCollisionExit: function (other) {
- }
- });
|