当前位置: 首页 > news >正文

win2012服务器网站建设电子商务网站怎么建

win2012服务器网站建设,电子商务网站怎么建,个人微信小程序怎么赚钱,凡科网让经营更简单目录 此篇需要你有一定的阅读代码的能力#xff0c;不然点开了也不知道在做什么 这是读表工具 So文件这么写 使用 此篇需要你有一定的阅读代码的能力#xff0c;不然点开了也不知道在做什么 在此之前你需要知道epplus是干什么的#xff0c;然后知道其基本api#xff0…目录 此篇需要你有一定的阅读代码的能力不然点开了也不知道在做什么  这是读表工具  So文件这么写 使用 此篇需要你有一定的阅读代码的能力不然点开了也不知道在做什么  在此之前你需要知道epplus是干什么的然后知道其基本api其实我之前写过一篇关于这个插件的说明         【插件】【干货】用EPPlus在Unity中读写Excel表_epplus unity-CSDN博客 读表工具  十分简单然后又写了一个存入so文件类涉及到一个所谓脏标记的api箭头读取该excel表必不可少的重要的信息 using System.Collections.Generic; using System.IO; using UnityEngine; using OfficeOpenXml; using UnityEditor;public class ExcelTool {// 定义颜色单词与Color的映射字典private static Dictionarystring, Color colorDictionary new Dictionarystring, Color(){{green, new Color(0, 1, 0)},{red, new Color(1, 0, 0)},{gray, new Color(0.5f, 0.5f, 0.5f)},{yellow, new Color(1, 1, 0)},{clear, new Color(0.5f, 0.5f, 0.5f, 0.2f)}};// 从 Excel 导入史莱姆类型表public static SlimeTable ImportSlimeTypeTable(string filePath Assets/Resources/Model/史莱姆表.xlsx) {SlimeTable slimeTypeTable ScriptableObject.CreateInstanceSlimeTable();using (ExcelPackage excelPackage new ExcelPackage(new FileInfo(filePath))) {ExcelWorksheet worksheet excelPackage.Workbook.Worksheets[1];int rowCount worksheet.Dimension.Rows;for (int i 2; i rowCount; i) {SlimeTypeData data new SlimeTypeData();int.TryParse(worksheet.Cells[i, 1].Value?.ToString(), out data.ID);data.ID i;if (System.Enum.TryParse(worksheet.Cells[i, 2].Value?.ToString(), out E_SlimeType slimeType)) {data.E_SlimeTypeData slimeType;}if (System.Enum.TryParse(worksheet.Cells[i, 3].Value?.ToString(), out E_Recip recip)) {data.E_RecipData recip;}string colorString worksheet.Cells[i, 4].Value?.ToString();if (!string.IsNullOrEmpty(colorString)) {colorString colorString.ToLower(); // 转换为小写确保与字典中的键匹配if (colorDictionary.TryGetValue(colorString, out Color color)) {data.colorData color;}else {Debug.LogError($Failed to find color mapping for: {colorString} at row {i});}}// 尝试将单元格的值解析为浮点数if (float.TryParse(worksheet.Cells[i, 5].Value?.ToString(), out float huangeyTime)) {data.huangeyTime huangeyTime;}else {Debug.LogError($Failed to parse huangeyTime at row {i});}slimeTypeTable.dataList.Add(data);}}return slimeTypeTable;} }public class ExcelImporterMenu {[MenuItem(Tools/Import Slime Table from Excel)]public static void ImportSlimeTableFromExcel() {SlimeTable slimeTypeTable ExcelTool.ImportSlimeTypeTable();if (slimeTypeTable ! null slimeTypeTable.dataList.Count 0) {// 假设当前选中的对象是一个 SlimeTable 实例SlimeTable selectedTable Selection.activeObject as SlimeTable;if (selectedTable ! null) {selectedTable.dataList slimeTypeTable.dataList;EditorUtility.SetDirty(selectedTable);AssetDatabase.SaveAssets();Debug.Log(史莱姆表已成功从 Excel 导入);}else {Debug.LogWarning(请先在项目窗口中选中一个 SlimeTable 实例);}}else {Debug.LogError(导入史莱姆表时出现问题请检查文件路径和文件内容);}} } So文件 using System; using System.Collections.Generic; using System.Linq; using UnityEngine;// 定义史莱姆类型数据结构[Serializable]public class SlimeTypeData {public int ID;public E_SlimeType E_SlimeTypeData;public E_Recip E_RecipData;public Color colorData;public float huangeyTime;} // 定义史莱姆类型表的 ScriptableObject[CreateAssetMenu(fileName 创建史莱姆列表)]public class SlimeTable : ScriptableObject {[SerializeField]public ListSlimeTypeData dataList new ListSlimeTypeData();public Slime IndexForType(Slime slime,int index,Food f){ if(dataList.Count!0) {SlimeTypeData data dataList[index];slime.gameObject.name data.E_SlimeTypeData.ToString();f.foodType data.E_RecipData;slime.E_SlimeType data.E_SlimeTypeData;slime.SpriteRd.color data.colorData;slime.MaxHuangryValue data.huangeyTime;slime.CurHuangryTimer slime.MaxHuangryValue;}return slime;} } 使用 选择你创建出来的SO文件然后点击你的菜单栏拓展 如果格式正确就能直接读取出来了
http://www.ho-use.cn/article/10813701.html

相关文章:

  • 网站网站是怎么建设的做课件好用的网站
  • 建设网站推广广告图分析网站建设的体会
  • 潍坊企业网站模板建站简述网站建设的流程
  • nodejs适合网站开发中信建设有限责任公司湖南分公司
  • wap网站制作怎么做常用网站建设技术是什么
  • 上海网站建设 网站开发友情链接的网站图片
  • 网站开发支付宝做网站后台需要什么
  • 建立网站需要多少钱湖南岚鸿品牌营销优化
  • 广告设计图网站wordpress禁止上传
  • 网站ui界面设计长沙岳麓区房价
  • 免费申请网站 免备案长沙百度搜索排名优化
  • dnf游戏币交易网站建设桓台网站开发
  • 国际阿里网站首页建设注册安全工程师注册管理系统
  • 网站为什么被降权推广软件有哪些
  • 常州网站seo定制相册哪个网站好
  • 在市场部做网站多少工资wordpress qq 群
  • 专做ppt的网站seo外包公司兴田德润
  • 数据库网站 建设方案十堰网站搜索优化价格
  • 网站搭建南京花都建设网站
  • 苏州知名网站建设建站公司织梦网站栏目不显示
  • 做网站图片如何不转下一行广州做网站优化
  • 网站建设公司 网络服务洛阳青峰网络让人去培训
  • 凡科网站后台正能量不良网站软件下载
  • 网站建设工作郑州做定制网站的公司
  • 360网站如何做引流wordpress喜欢
  • 建设网站公司需要准备哪些材料做爰全过程免费网站可以看
  • 做网站的公司哪家最好电子商务平台网站开发
  • 深圳网络专科网站建设宿迁做网站建设的公司
  • 企业网站建设用什么语言网页界面设计案例赏析
  • 小企业网站建设哪些好办深圳网站建设制作优化