public void init(JsonObject jo, PveScene _pvescene) { base.init(); pvescene = _pvescene; entityData = jo; PropertyDic[Property.HP] = PropertyDic[Property.MAXHP] = int.Parse(jo["hp"].ToString()); //jo = HeroManager.getInstance ().getHeroStaticData (jo); style.sprite = Resources.Load(jo["style"].ToString(), typeof(Sprite)) as Sprite; style.SetNativeSize(); entityName.text = jo["name"].ToString(); entityName.color = DataManager.getInstance().getColor(jo["color"].ToString()); PropertyDic[Property.SPEED] = int.Parse(jo ["speed"].ToString()); PropertyDic[Property.AP] = int.Parse(jo ["attack"].ToString()); }
public void init(JsonObject jo, PveScene _pvescene) { base.init(); pvescene = _pvescene; entityData = jo; threat = PropertyDic[Property.AP] = DataManager.getInstance().getHeroDamage(jo); PropertyDic[Property.HP] = PropertyDic[Property.MAXHP] = DataManager.getInstance().getHeroHp(jo); jo = HeroManager.getInstance().getHeroStaticData(jo); style.sprite = Resources.Load("heroHanf/" + jo["style"].ToString(), typeof(Sprite)) as Sprite; PropertyDic[Property.SPEED] = int.Parse(jo ["speed"].ToString()); initSkillTurn(jo); PropertyDic[Property.MP] = PropertyDic[Property.MAXMP] = 100; //默认全为100 //select.gameObject.SetActive (false); //style.SetNativeSize (); }