public virtual void Refresh(HeroData data)
    {
        if (data != null)
        {
            //Debug.Log("init hero ava" + data.templateID);
            hero = data;

            bool isDead = data.getCurPro((int)GlobalDef.NewHeroProperty.PRO_LIFEPOINT) == 0;
            //TODO:
            if (icon)
            {
                icon.spriteName = data.icon_middle;
                if (isDead)
                {
                    //set gray
                    icon.color = new Color(0, 0, 0);
                }
                else
                {
                    icon.color = new Color(255, 255, 255);
                }
            }
            //Debug.Log(data.icon_middle);

            if (sprDead)
                if (!isDead)
                {
                    sprDead.enabled = false;
                }
                else SetDead();

            SetHP();
            SetLevel(data.level);
            SetOther(data);
        }
        else RefreshNull();

    }