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

网站建设公开手机兼职工作有哪些

网站建设公开,手机兼职工作有哪些,魏县做网站,自适应网站什么做1、目标 保存下面库存栏中信息到文件中。 2、修改SceneSave.cs脚本 添加2行代码#xff1a; 3、修改InventoryManager对象 添加Generate GUID组件。 4、修改InventoryManager.cs脚本 添加继承自ISaveable 添加属性信息#xff1a; private string _iSaveableUniqueID;pub…1、目标 保存下面库存栏中信息到文件中。 2、修改SceneSave.cs脚本 添加2行代码 3、修改InventoryManager对象 添加Generate GUID组件。 4、修改InventoryManager.cs脚本 添加继承自ISaveable 添加属性信息 private string _iSaveableUniqueID;public string ISaveableUniqueID { get { return _iSaveableUniqueID; } set { _iSaveableUniqueID value; } }private GameObjectSave _gameObjectSave;public GameObjectSave GameObjectSave { get { return _gameObjectSave; } set { _gameObjectSave value; } }private UIInventoryBar inventoryBar; 在Awake()方法中添加2行代码 添加如下几个方法 private void OnDisable(){ISaveableDeregister();}private void OnEnable(){ISaveableRegister();}private void Start() {inventoryBar FindObjectOfTypeUIInventoryBar(); }public void ISaveableRegister(){SaveLoadManager.Instance.iSaveableObjectList.Add(this);}public void ISaveableDeregister(){SaveLoadManager.Instance.iSaveableObjectList.Remove(this);}public GameObjectSave ISaveableSave(){// Create new scene saveSceneSave sceneSave new SceneSave();// Remove any existing scene save for persistent scene for this gameobjectGameObjectSave.sceneData.Remove(Settings.PersistentScene);// Add inventory lists array to persistent scene savesceneSave.listInvItemArray inventoryLists;// Add inventory list capacity array to persistent scene savesceneSave.intArrayDictionary new Dictionarystring, int[]();sceneSave.intArrayDictionary.Add(inventoryListCapacityArray, inventoryListCapacityIntArray);// Add scene save for gameobjectGameObjectSave.sceneData.Add(Settings.PersistentScene, sceneSave);return GameObjectSave;}public void ISaveableLoad(GameSave gameSave){if(gameSave.gameObjectData.TryGetValue(ISaveableUniqueID, out GameObjectSave gameObjectSave)){GameObjectSave gameObjectSave;// Need to find inventory lists - start by trying to locate saveScene for game objectif(gameObjectSave.sceneData.TryGetValue(Settings.PersistentScene, out SceneSave sceneSave)){// list inv items array exists for persistent sceneif(sceneSave.listInvItemArray ! null){inventoryLists sceneSave.listInvItemArray;// Send events that inventory has been updatedfor(int i 0; i (int)InventoryLocation.count; i){EventHandler.CallInventoryUpdatedEvent((InventoryLocation)i, inventoryLists[i]);}// Clear any items player was carryingPlayer.Instance.ClearCarriedItem();// Clear any highlights on inventory barinventoryBar.ClearHighlightOnInventorySlots();}// int array dictionary exists for sceneif(sceneSave.intArrayDictionary ! null sceneSave.intArrayDictionary.TryGetValue(inventoryListCapacityArray, out int[] inventoryCapacityArray)){inventoryListCapacityIntArray inventoryCapacityArray;}}}}public void ISaveableStoreScene(string sceneName){// Nothing required here since the inventory manager is on a persistent scene;}public void ISaveableRestoreScene(string sceneName){// Nothing required here since the inventory manager is on a persistent scene;}5、运行游戏 角色收集的item放到库存栏中save game后退出游戏重新进入游戏后load game库存栏中的信息保持不变。
http://www.zqtcl.cn/news/445299/

相关文章:

  • 开发软件自学步骤朝阳seo推广
  • Wordpress有用么网络推广seo怎么做
  • 企业做网站的注意事项深圳市建网站
  • 代做网站关键词怎么自创网页
  • 网站建设资金申请报告深圳物流公司收费标准
  • 全能企业网站管理系统做教案比较好的网站
  • 昆明做网站竞价单页营销型网站建设
  • 网站注销备案查询厦门好的做网站公司
  • 大学生兼职网站做ppt数字化营销模式及特点
  • 网站虚拟主机1gwordpress自定义头像插件
  • 网站建设的栏目策划长沙网站制作价
  • h5商城网站怎么建立建设银行网站号
  • 养殖舍建设网站网站设计建设流程图
  • 麦包包的网站建设分析陕西城乡建设部网站
  • 网站测评必须做灯笼制作手工简单又漂亮
  • 购物网站建设的意义与目的wordpress 插件 加速
  • 大型html5浅蓝色网站设计公司dede模板网店怎么开店详细教程
  • 一个阿里云怎么做两个网站吗樱花16q808a
  • 如何利用服务器做网站网站建设朝阳
  • 比邻店网站开发企查查企业信息查询在线
  • 家乡网站建设策划案专业建设专题网站
  • 网站建设公司挣钱吗wordpress评论内容密码保护
  • 上海专业建站最低价网站程序模板
  • 蚌埠网站建设哪家好创客贴官网
  • php网站建设参考文献wordpress 头像 很慢
  • 大连seo网站推广phpcmsv9手机网站源码
  • 公司做推广做网站好还是俄文网站引擎
  • 上海市建设咨询协会网站asp网站源码
  • 大家都在哪些网站上做医药招商wordpress po文件
  • 国外主题网站兰州app