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

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

    }



    beEaten(target: Snake) {
        target.useGrow()

    }

    update(deltaTime: number) {

    }

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

