import { _decorator, Component, Node } from 'cc';
import { PropBase } from './PropBase';
import { Snake } from '../Snake';
import { PropManager } from '../Manager/PropManager';
const { ccclass, property } = _decorator;

@ccclass('Double')
export class Double extends PropBase {
    start() {

    }


    beEaten(target: Snake) {
        target.useDouble();
    }

    update(deltaTime: number) {

    }

    recycle(): void {
        super.recycle()
        this.node.removeFromParent();
        this.node.destroy();
        PropManager.ins.check();
    }
}

