import { getSkinPath } from "../utils";

/**
 * 单条收支记录
 */
export default class DogItem extends eui.Component {


    public dogGroup:eui.Group;
    public dog_lv_1:eui.Image;
    public dog_lv_2:eui.Image;
    public dog_lv_3:eui.Image;
    public dog_lv_4:eui.Image;
    public dog_lv_5:eui.Image;
    public dog_lv_6:eui.Image;
    public dog_lv_7:eui.Image;
    public dog_lv_8:eui.Image;
    public dog_lv_9:eui.Image;
    public dog_lv_10:eui.Image;
    public dog_lv_11:eui.Image;
    public dog_lv_12:eui.Image;
    public dog_lv_13:eui.Image;
    public dog_lv_14:eui.Image;
    public dog_lv_15:eui.Image;
    public dog_lv_16:eui.Image;
    public dog_lv_17:eui.Image;
    public dog_lv_18:eui.Image;
    public dog_lv_19:eui.Image;
    public dog_lv_20:eui.Image;
    public dog_lv_21:eui.Image;
    public dog_lv_22:eui.Image;
    public dog_lv_23:eui.Image;
    public dog_lv_24:eui.Image;
    public dog_lv_25:eui.Image;
    public dog_lv_26:eui.Image;
    public dog_lv_27:eui.Image;
    public dog_lv_28:eui.Image;
    public dog_lv_29:eui.Image;
    public dog_lv_30:eui.Image;
    public tipsGroup:eui.Group;
    public lvGroup:eui.Group;
    
    

    lv
 
    constructor(data?){
        super();
        this.skinName = getSkinPath('DogItem');
        this.touchChildren = true;
        this.init();
    }

    public init():void{
      for(let i=1;i<=30;i++){
          console.log("dog_lv_"+i)
          this["dog_lv_"+i].visible=false;
      }
      this.visible=false;
    }

    setLv(lv){
        if(lv!=0){
            this.visible=true;
            this["dog_lv_"+lv].visible=true;
        }else{
            this.visible=false;
        }
    }
}