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

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

    }


    beEaten(target: Snake) {
        console.warn("useDefense")
        target.useSpeed();
    }

    update(deltaTime: number) {

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

