12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- cc.Class({
- extends: cc.Component,
- properties: {
- item: cc.Node
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- init (bottle) {
- this.bottle = bottle
- },
- onCollisionEnter (other, self) {
- // this.getComponent(cc.Animation).play();
- this.scheduleOnce(() => {
- this.bottle.doEnterCtrl();
- }, 0.1)
- },
- showGold () {
- this.item.active = true;
- this.item.y = 150;
- },
- showSubline () {
- this.item.active = true;
- this.item.y = 144;
- },
- showHit () {
- this.item.active = true;
- this.item.y = 150;
- },
- start () {
- },
- // update (dt) {},
- });
|