protected override void OnCreate() { base.OnCreate(); // 初始化角色数据 CfgMonsterTable table = CfgMonster.Instance.GetConfigTable(_monsterID); CharData.InitData(table.BodyRadius, table.MoveSpeed, table.Hp, table.Mp, table.Damage, table.Armor); }
private EntityMonster CreateMonster(int monsterID, Vector3 pos, Vector3 rot) { CfgMonsterTable monsterTable = CfgMonster.Instance.GetConfigTable(monsterID); if (monsterTable == null) { return(null); } EntityMonster monster = new EntityMonster(++EntityID, monsterID); monster.Create(this, monsterTable.AvatarID, pos, rot); return(monster); }