import { _decorator, Component, Label, Node, Sprite } from 'cc';
import { car_item_data } from '../data';
import { tools } from '../tools';
import { imageCacheManager } from '../manager/imageCacheManager';
const { ccclass, property } = _decorator;

@ccclass('results_item')
export class results_item extends Component {
    @property(Node) icon:Node = null
    @property(Node) lab_name:Node = null
    public init(data:car_item_data){
        this.icon.getComponent(Sprite).spriteFrame = imageCacheManager.getRankCarImageById(data.id)
        this.lab_name.getComponent(Label).string = data.name
    }
    start() {

    }
}


