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

wordpress的搜索功能seo点击软件手机

wordpress的搜索功能,seo点击软件手机,怎么修改网站的域名,在那些网站可以接兼职做我们打开上一篇62QFrameWork背包框架的项目, 上文将功能实现在一个脚本中 本章要做的事情让脚本实现背包框架思想 首先按照图示创建脚本: 创建脚本:Item.cs namespace QFramework {public class Item{//道具public string Key;public string …

我们打开上一篇62QFrameWork背包框架的项目,

上文将功能实现在一个脚本中

本章要做的事情让脚本实现背包框架思想

首先按照图示创建脚本:

创建脚本:Item.cs

namespace QFramework {public class Item{//道具public string Key;public string Name;public Item(string key, string name){Key = key;Name = name;}}
}

创建脚本:Slot.cs

namespace QFramework {//插槽格子Slotpublic class Slot{public Item Item;public int Count;public Slot(Item item, int count){Item = item;Count = count;}}
}

创建脚本:QFramework.cs

using System.Collections.Generic;
namespace QFramework {public class ItemKit{//数据public static Item Item1 = new("item_1", "物品1");public static Item Item2 = new("item_2", "物品2");public static Item Item3 = new("item_3", "物品3");public static Item Item4 = new("item_4", "物品4");public static Item Item5 = new("item_5", "物品5");//插槽格子Slot列表public static List<Slot> Slots = new List<Slot>() {new Slot(Item1,1),new Slot(Item2,10),new Slot(Item3,1),new Slot(Item4,1),};//根据Key获取Itempublic static Dictionary<string, Item> ItemByKey = new Dictionary<string, Item>() {{ Item1.Key,Item1 },{ Item2.Key,Item2 },{ Item3.Key,Item3 },{ Item4.Key,Item4 },{ Item5.Key,Item5 },};//获取道具方法//Slot FindSlotByKey(string itemKey) {//    return mSlots.Find(s => s.Item != null && s.Item.Key == itemKey && s.Count != 0);//}//获取道具方法public static Slot FindSlotByKey(string itemKey) => ItemKit.Slots.Find(s => s.Item != null && s.Item.Key == itemKey && s.Count != 0);//获取空格子方法public static Slot FindEmptySlot() => ItemKit.Slots.Find(s => s.Count == 0);//可以增加格子方法public static Slot FindAddableSlot(string itemKey){var slot = FindSlotByKey(itemKey);if (slot == null){slot = FindEmptySlot();if (slot != null)slot.Item = ItemKit.ItemByKey[itemKey];}return slot;}//增加道具方法public static bool AddItem(string itemKey, int addCount = 1){var slot = FindAddableSlot(itemKey);if (slot == null)return false;elseslot.Count += addCount;return true;}//减少道具方法public static bool SubItem(string itemKey, int subCount = 1){var slot = FindSlotByKey(itemKey);if (slot != null){slot.Count -= subCount;return true;}return false;}}
}

修改脚本:InventoryExample1.cs

using UnityEngine;
namespace QFramework.Example{public partial class InventoryExample1 : ViewController {void OnGUI(){//调用IM帮助类的设置设计分辨率函数IMGUIHelper.SetDesignResolution(640,360);foreach (var slot in ItemKit.Slots) {//创建一个"box"类型的水平布局图形用户界面GUILayout.BeginHorizontal("box");if (slot.Count == 0)GUILayout.Label($"格子:空");else//在水平布局图形用户界面中添加一个标签GUILayout.Label($"格子:{slot.Item.Name} x {slot.Count}");//结束水平布局组GUILayout.EndHorizontal();}GUILayout.BeginHorizontal();GUILayout.Label("物品1");//创建一个按钮 - 增加if (GUILayout.Button("+")){if (!ItemKit.AddItem("item_1"))Debug.Log("物品栏已满");}//减少if (GUILayout.Button("-")){ ItemKit.SubItem("item_1"); }GUILayout.EndHorizontal();GUILayout.BeginHorizontal();GUILayout.Label("物品2");//创建一个按钮 - 增加if (GUILayout.Button("+")) {if (!ItemKit.AddItem("item_2"))Debug.Log("物品栏已满");}//减少if (GUILayout.Button("-")) { ItemKit.SubItem("item_2"); }GUILayout.EndHorizontal();GUILayout.BeginHorizontal();GUILayout.Label("物品3");//创建一个按钮 - 增加if (GUILayout.Button("+")) {if (!ItemKit.AddItem("item_3"))Debug.Log("物品栏已满");}//减少if (GUILayout.Button("-")) { ItemKit.SubItem("item_3"); }GUILayout.EndHorizontal();GUILayout.BeginHorizontal();GUILayout.Label("物品4");//创建一个按钮 - 增加if (GUILayout.Button("+")) {if (!ItemKit.AddItem("item_4"))Debug.Log("物品栏已满");}//减少if (GUILayout.Button("-")) { ItemKit.SubItem("item_4"); }GUILayout.EndHorizontal();GUILayout.BeginHorizontal();GUILayout.Label("物品5");//创建一个按钮 - 增加if (GUILayout.Button("+")) {if (!ItemKit.AddItem("item_5"))Debug.Log("物品栏已满");}//减少if (GUILayout.Button("-")) { ItemKit.SubItem("item_5"); }GUILayout.EndHorizontal();}}
}

本章做了让脚本实现背包框架思想

接下来的文章内容:

1.QFrameWork道具栏物品生成

2.窗口可拖拽脚本

3.点击名称寻找地点功能

4.隐藏怪物的生成

5.怪物I攻击范围内的主动攻击

6.掉落坐骑蛋的获取

7.异步传送转换场景

以及开放回合制、坐骑系统、宠物系统、背包系统、神炼系统、商城系统、Boss的目标跟随任务导航系统以及UI播放3D动画效果等等。

具体项目运行效果请关注water1024的b站视频项目演示《破碎纪元》

【Unity回合2.5D】破碎纪元_单机游戏热门视频 (bilibili.com)icon-default.png?t=O83Ahttps://www.bilibili.com/video/BV1rZY4e9Ebs/?spm_id_from=333.999.0.0&vd_source=547091a95b03acfa8e8a9e46ef499cd6

http://www.15wanjia.com/news/57446.html

相关文章:

  • 做网站 传视频 用什么笔记本好济南网站建设公司
  • 做微电网的公司网站百度联盟点击广告赚钱
  • 网络公司名字四个字关键字优化用什么系统
  • 云南SEO网站建设网络营销案例
  • 网站建设中期检查表怎么写百度资源提交
  • 专门做招商的网站西安推广平台排行榜
  • 金山做网站的公司做seo要投入什么
  • 台州网站定制百度新版本更新下载
  • 梁山网站建设aso优化是什么
  • 做外贸翻译用那个网站长尾关键词是什么
  • 平台网站建设费用设计公司网站模板
  • 建立企业网站的步骤搜索引擎是什么
  • 免费代理服务器地址独立站seo外链平台
  • 淘宝联盟如何做网站百度快照排名
  • 如何建设淘宝客网站宣传推广
  • 江苏泗阳今天新增病例多少seo网络推广优化教程
  • 飞言情做最好的言情网站北京谷歌优化
  • 医院网站建设方案计划搜索图片识别出处百度识图
  • 淡水网站建设哪家便宜专门看广告的网站
  • 衢江网站建设免费找客源软件
  • 翻译网站素材代运营是什么意思
  • 桂平市住房和城乡建设局门户网站广州seo网络营销培训
  • 装修公司做宣传在哪个网站全国疫情排行榜
  • 江苏雷威建设工程有限公司网站微信公众号推广软文案例
  • 如何搭建网站服务器百度推广基木鱼
  • 网站优化制作公司代理品牌营销策划是干嘛的
  • 有域名怎么注册邮箱长沙网站优化价格
  • 杭州网站备案要多久今日广州新闻最新消息
  • 网站网页制作企业网络营销专业是干嘛的
  • 商城网站怎么做18款免费软件app下载