public void SetData(ActorVO vo) { if (vo == null) { return; } NameTxt.text = vo.Name; LevelTxt.text = vo.Level.ToString(); RaceTxt.text = SwordUtil.GetRaceName(vo.RaceEnum); ClassTxt.text = SwordUtil.GetClassName(vo.ClassEnum); }
//在固定位置创建怪物 private void CreateMonsterAtPos(int metaId, int lv, Vector3 pos) { var meta = ActorMetaManager.GetMeta(metaId); var entity = CWorld.Instance.SpawnUnit <BotEntity>("Bot_" + meta.Name, pos); entity.Address = meta.Address; entity.Team = CUnitEntity.TeamSide.Blue; var go = entity.gameObject; var ctrl = go.AddComponent <BotController>(); var attr = entity.AttributeSet; attr.InitAttr(meta.SubClass, meta.SubRace, meta.HealthRank); attr.InitLevel(1); ActorVO vo = new ActorVO(); //vo.ai = AIMetaManager.GetMeta(ai); //vo.Init(lv); }