Skip to content

Instantly share code, notes, and snippets.

@philipshen
Created June 19, 2018 13:15
Show Gist options
  • Save philipshen/bdf9e3f6e586eaff0aed081a3d23195d to your computer and use it in GitHub Desktop.
Save philipshen/bdf9e3f6e586eaff0aed081a3d23195d to your computer and use it in GitHub Desktop.
// Cannon.ts
import Game from './Game'
@ccclass
export default class Cannon extends cc.Component {
game: Game
onLoad() {
this.game = cc.find('/Game').getComponent('Game')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment