From 9cd1d2d352ceafa97bffa247a85330fb78bd5845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E5=87=A4=E5=95=B8=E5=A4=A9?= <1379113792@qq.com> Date: Tue, 9 Jul 2019 09:56:05 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=A2=9EItemObject=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Engine/CLEngine.Core/CLEngine.Core.csproj | 1 + Engine/CLEngine.Core/framework/ItemObject.cs | 46 +++++++++++++++++++ .../Properties/AddinInfo.cs | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Engine/CLEngine.Core/framework/ItemObject.cs diff --git a/Engine/CLEngine.Core/CLEngine.Core.csproj b/Engine/CLEngine.Core/CLEngine.Core.csproj index 997f332..8dc420f 100644 --- a/Engine/CLEngine.Core/CLEngine.Core.csproj +++ b/Engine/CLEngine.Core/CLEngine.Core.csproj @@ -294,6 +294,7 @@ + diff --git a/Engine/CLEngine.Core/framework/ItemObject.cs b/Engine/CLEngine.Core/framework/ItemObject.cs new file mode 100644 index 0000000..27b3bb9 --- /dev/null +++ b/Engine/CLEngine.Core/framework/ItemObject.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Collections; + +namespace CLEngine.Core.framework +{ + public class Attribute { + string Name; + object Value; + public Attribute(string name,object value) { + Name = name; + Value = value; + } + } + class ItemObject:GameObject + { + public EventHandler Use; + public EventHandler Get; + public EventHandler Throw; + public EventHandler NumberChange; + + string IconPath; + string ItemName; + string Description; + string ItemType; + + List AttributeList; + + public string GetItemName() { return ItemName; } + public string GetItemType() { return ItemType; } + + public ItemObject(string path,string type,string name,string describe) { + Use = null; + Get = null; + Throw = null; + NumberChange = null; + IconPath = path; + Name = name; + ItemType = type; + Description = describe; + } + } +} diff --git a/ThirdParty/MonoGame/IDE/VisualStudioForMac/Properties/AddinInfo.cs b/ThirdParty/MonoGame/IDE/VisualStudioForMac/Properties/AddinInfo.cs index be571ee..3ea3afb 100644 --- a/ThirdParty/MonoGame/IDE/VisualStudioForMac/Properties/AddinInfo.cs +++ b/ThirdParty/MonoGame/IDE/VisualStudioForMac/Properties/AddinInfo.cs @@ -1,7 +1,7 @@ using System; using Mono.Addins; using Mono.Addins.Description; -[assembly: Addin("MonoGame_IDE_VisualStudioForMac",Namespace = "MonoDevelop",Version = "0.0.0.0")] +[assembly: Addin("MonoGame_IDE_VisualStudioForMac",Namespace = "MonoDevelop",Version = "3.7.0.0")] [assembly: AddinName("MonoGame Extension")] [assembly: AddinCategory("Game Development")] [assembly: AddinDescription("VisualStudio for Mac extension for MonoGame")] -- Gitee From 5cd7a24675fdbf0d65dae7d545aa958bf53cc324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E5=87=A4=E5=95=B8=E5=A4=A9?= <1379113792@qq.com> Date: Tue, 9 Jul 2019 10:06:49 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Engine/CLEngine.Core/framework/ItemObject.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Engine/CLEngine.Core/framework/ItemObject.cs b/Engine/CLEngine.Core/framework/ItemObject.cs index 27b3bb9..2c15a0e 100644 --- a/Engine/CLEngine.Core/framework/ItemObject.cs +++ b/Engine/CLEngine.Core/framework/ItemObject.cs @@ -31,6 +31,7 @@ namespace CLEngine.Core.framework public string GetItemName() { return ItemName; } public string GetItemType() { return ItemType; } + public List GetAttributes() { return AttributeList; } public ItemObject(string path,string type,string name,string describe) { Use = null; -- Gitee From 857043bed118d38397f6e52e6943d5e6113b9a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E5=87=A4=E5=95=B8=E5=A4=A9?= <1379113792@qq.com> Date: Tue, 9 Jul 2019 11:28:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Engine/CLEngine.Core/framework/ItemObject.cs | 96 ++++++++++++++------ 1 file changed, 68 insertions(+), 28 deletions(-) diff --git a/Engine/CLEngine.Core/framework/ItemObject.cs b/Engine/CLEngine.Core/framework/ItemObject.cs index 2c15a0e..d846040 100644 --- a/Engine/CLEngine.Core/framework/ItemObject.cs +++ b/Engine/CLEngine.Core/framework/ItemObject.cs @@ -1,47 +1,87 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; -using System.Collections; namespace CLEngine.Core.framework { - public class Attribute { - string Name; - object Value; - public Attribute(string name,object value) { - Name = name; - Value = value; + public class ItemEventArgs : EventArgs + { + int userId; + public ItemEventArgs(int user) + { + userId = user; } } - class ItemObject:GameObject + public class ItemObject { public EventHandler Use; public EventHandler Get; public EventHandler Throw; public EventHandler NumberChange; - string IconPath; - string ItemName; - string Description; - string ItemType; - - List AttributeList; - - public string GetItemName() { return ItemName; } - public string GetItemType() { return ItemType; } - public List GetAttributes() { return AttributeList; } - - public ItemObject(string path,string type,string name,string describe) { - Use = null; - Get = null; - Throw = null; - NumberChange = null; - IconPath = path; - Name = name; - ItemType = type; - Description = describe; + [DataMember] private string _IconPath; + [DataMember] private string _Name; + [DataMember] private string _Description; + [DataMember] private string _Type; + [DataMember] private int _userId; + [DataMember] private int _Number; + [DataMember] private int _MaxNumber; + [DataMember] private int _Hp;//耐久 + [DataMember] private int _MaxHp;//最大耐久 + //Add开头的为附加属性 + [DataMember] private int _AddMoveSpeed; + [DataMember] private int _AddAtkSpeed; + [DataMember] private int _AddAtkRange; + [DataMember] private int _AddHeroHp; + [DataMember] private int _AddHeroMp; + [DataMember] private int _AddReturnHp;//回血 + [DataMember] private int _AddReturnMp;//回蓝 + public string Type { get { return _Type; } set { _Type = value; } } + public string Description { get { return _Description; } set { _Description = value; } } + public string Name { get { return _Name; } set { _Name = value; } } + public string IconPath { get { return _IconPath; } set { _IconPath = value; } } + public int userId { get { return _userId; } set { _userId = value; } } + public int Number { get { return _Number; } set { _Number = value; } } + public int MaxNumber { get { return _MaxNumber; } set { _MaxNumber = value; } } + public int Hp { get { return _Hp; } set { _Hp = value; } } + public int MaxHp { get { return _MaxHp; } set { _MaxHp = value; } } + public int AddMoveSpeed { get { return _AddMoveSpeed; } set { _AddMoveSpeed = value; } } + public int AddAtkSpeed { get { return _AddAtkSpeed; } set { _AddAtkSpeed = value; } } + public int AddAtkRange { get { return _AddAtkRange; } set { _AddAtkRange = value; } } + public int AddHeroHp { get { return _AddHeroHp; } set { _AddHeroHp = value; } } + public int AddHeroMp { get { return _AddHeroMp; } set { _AddHeroMp = value; } } + public int AddReturnHp { get { return _AddReturnHp; } set { _AddReturnHp = value; } } + public int AddReturnMp { get { return _AddReturnMp; } set { _AddReturnMp = value; } } + public void UseMethod() + { + if (Use != null) + { + Use.Invoke(this, new ItemEventArgs(userId)); + } + } + public void getMethod() + { + if (Get != null) + { + Get.Invoke(this, new ItemEventArgs(userId)); + } + } + public void ThrowMethod() + { + if (Throw != null) + { + Throw.Invoke(this, new ItemEventArgs(userId)); + } + } + public void NumberChangeMethod() + { + if (NumberChange != null) + { + NumberChange.Invoke(this, new ItemEventArgs(userId)); + } } } } -- Gitee From 580b9259b9902be4afd34f42b748b78d1a06d943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E5=87=A4=E5=95=B8=E5=A4=A9?= <1379113792@qq.com> Date: Tue, 9 Jul 2019 11:45:07 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E5=A0=86?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Engine/CLEngine.Core/framework/ItemObject.cs | 140 ++++++++++++++----- 1 file changed, 106 insertions(+), 34 deletions(-) diff --git a/Engine/CLEngine.Core/framework/ItemObject.cs b/Engine/CLEngine.Core/framework/ItemObject.cs index d846040..07e6363 100644 --- a/Engine/CLEngine.Core/framework/ItemObject.cs +++ b/Engine/CLEngine.Core/framework/ItemObject.cs @@ -17,66 +17,138 @@ namespace CLEngine.Core.framework } public class ItemObject { + /// + /// 使用事件 + /// public EventHandler Use; + /// + /// 获取事件 + /// public EventHandler Get; + /// + /// 丢弃事件 + /// public EventHandler Throw; + /// + /// 物品数量改变事件 + /// public EventHandler NumberChange; - [DataMember] private string _IconPath; - [DataMember] private string _Name; - [DataMember] private string _Description; - [DataMember] private string _Type; + [DataMember] private string _iconPath; + [DataMember] private string _name; + [DataMember] private string _description; + [DataMember] private string _type; [DataMember] private int _userId; - [DataMember] private int _Number; - [DataMember] private int _MaxNumber; - [DataMember] private int _Hp;//耐久 - [DataMember] private int _MaxHp;//最大耐久 + [DataMember] private int _number; + [DataMember] private int _maxNumber; + [DataMember] private int _hp;//耐久 + [DataMember] private int _maxHp;//最大耐久 //Add开头的为附加属性 - [DataMember] private int _AddMoveSpeed; - [DataMember] private int _AddAtkSpeed; - [DataMember] private int _AddAtkRange; - [DataMember] private int _AddHeroHp; - [DataMember] private int _AddHeroMp; - [DataMember] private int _AddReturnHp;//回血 - [DataMember] private int _AddReturnMp;//回蓝 - public string Type { get { return _Type; } set { _Type = value; } } - public string Description { get { return _Description; } set { _Description = value; } } - public string Name { get { return _Name; } set { _Name = value; } } - public string IconPath { get { return _IconPath; } set { _IconPath = value; } } + [DataMember] private int _addMoveSpeed; + [DataMember] private int _addAtkSpeed; + [DataMember] private int _addAtkRange; + [DataMember] private int _addHeroHp; + [DataMember] private int _addHeroMp; + [DataMember] private int _addReturnHp;//回血 + [DataMember] private int _addReturnMp;//回蓝 + /// + /// + /// + public string Type { get { return _type; } set { _type = value; } } + /// + /// + /// + public string Description { get { return _description; } set { _description = value; } } + /// + /// + /// + public string Name { get { return _name; } set { _name = value; } } + /// + /// + /// + public string IconPath { get { return _iconPath; } set { _iconPath = value; } } + /// + /// + /// public int userId { get { return _userId; } set { _userId = value; } } - public int Number { get { return _Number; } set { _Number = value; } } - public int MaxNumber { get { return _MaxNumber; } set { _MaxNumber = value; } } - public int Hp { get { return _Hp; } set { _Hp = value; } } - public int MaxHp { get { return _MaxHp; } set { _MaxHp = value; } } - public int AddMoveSpeed { get { return _AddMoveSpeed; } set { _AddMoveSpeed = value; } } - public int AddAtkSpeed { get { return _AddAtkSpeed; } set { _AddAtkSpeed = value; } } - public int AddAtkRange { get { return _AddAtkRange; } set { _AddAtkRange = value; } } - public int AddHeroHp { get { return _AddHeroHp; } set { _AddHeroHp = value; } } - public int AddHeroMp { get { return _AddHeroMp; } set { _AddHeroMp = value; } } - public int AddReturnHp { get { return _AddReturnHp; } set { _AddReturnHp = value; } } - public int AddReturnMp { get { return _AddReturnMp; } set { _AddReturnMp = value; } } - public void UseMethod() + /// + /// + /// + public int Number { get { return _number; } set { _number = value; } } + /// + /// + /// + public int MaxNumber { get { return _maxNumber; } set { _maxNumber = value; } } + /// + /// + /// + public int Hp { get { return _hp; } set { _hp = value; } } + /// + /// + /// + public int MaxHp { get { return _maxHp; } set { _maxHp = value; } } + /// + /// + /// + public int AddMoveSpeed { get { return _addMoveSpeed; } set { _addMoveSpeed = value; } } + /// + /// + /// + public int AddAtkSpeed { get { return _addAtkSpeed; } set { _addAtkSpeed = value; } } + /// + /// + /// + public int AddAtkRange { get { return _addAtkRange; } set { _addAtkRange = value; } } + /// + /// + /// + public int AddHeroHp { get { return _addHeroHp; } set { _addHeroHp = value; } } + /// + /// + /// + public int AddHeroMp { get { return _addHeroMp; } set { _addHeroMp = value; } } + /// + /// + /// + public int AddReturnHp { get { return _addReturnHp; } set { _addReturnHp = value; } } + /// + /// + /// + public int AddReturnMp { get { return _addReturnMp; } set { _addReturnMp = value; } } + /// + /// 使用物品 + /// + public void UseItem() { if (Use != null) { Use.Invoke(this, new ItemEventArgs(userId)); } } - public void getMethod() + /// + /// 获取物品 + /// + public void getItem() { if (Get != null) { Get.Invoke(this, new ItemEventArgs(userId)); } } - public void ThrowMethod() + /// + /// 丢掉物品 + /// + public void ThrowItem() { if (Throw != null) { Throw.Invoke(this, new ItemEventArgs(userId)); } } - public void NumberChangeMethod() + /// + /// 物品数量改变 + /// + public void ItemNumberChange() { if (NumberChange != null) { -- Gitee From 8ea42a072496e0a9fc6ef00d79d7346f4222f810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E5=87=A4=E5=95=B8=E5=A4=A9?= <1379113792@qq.com> Date: Tue, 9 Jul 2019 11:53:48 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=20=E7=89=A9=E5=93=81id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Engine/CLEngine.Core/framework/ItemObject.cs | 37 +++++++++++--------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/Engine/CLEngine.Core/framework/ItemObject.cs b/Engine/CLEngine.Core/framework/ItemObject.cs index 07e6363..497fab6 100644 --- a/Engine/CLEngine.Core/framework/ItemObject.cs +++ b/Engine/CLEngine.Core/framework/ItemObject.cs @@ -39,6 +39,7 @@ namespace CLEngine.Core.framework [DataMember] private string _description; [DataMember] private string _type; [DataMember] private int _userId; + [DataMember] private int _id; [DataMember] private int _number; [DataMember] private int _maxNumber; [DataMember] private int _hp;//耐久 @@ -52,67 +53,71 @@ namespace CLEngine.Core.framework [DataMember] private int _addReturnHp;//回血 [DataMember] private int _addReturnMp;//回蓝 /// - /// + /// 物品类型 /// public string Type { get { return _type; } set { _type = value; } } /// - /// + /// 物品描述 /// public string Description { get { return _description; } set { _description = value; } } /// - /// + /// 物品名称 /// public string Name { get { return _name; } set { _name = value; } } /// - /// + /// 物品图标路径 /// public string IconPath { get { return _iconPath; } set { _iconPath = value; } } /// - /// + /// 持有者id /// public int userId { get { return _userId; } set { _userId = value; } } /// - /// + /// 物品id + /// + public int Id { get { return _id; } internal set { _id = value; } } + /// + /// 数量 /// public int Number { get { return _number; } set { _number = value; } } /// - /// + /// 最大堆叠数量 /// public int MaxNumber { get { return _maxNumber; } set { _maxNumber = value; } } /// - /// + /// 耐久 /// public int Hp { get { return _hp; } set { _hp = value; } } /// - /// + /// 最大耐久 /// public int MaxHp { get { return _maxHp; } set { _maxHp = value; } } /// - /// + /// 附加属性:移动速度 /// public int AddMoveSpeed { get { return _addMoveSpeed; } set { _addMoveSpeed = value; } } /// - /// + /// 附加属性:攻击速度 /// public int AddAtkSpeed { get { return _addAtkSpeed; } set { _addAtkSpeed = value; } } /// - /// + /// 附加属性:攻击范围 /// public int AddAtkRange { get { return _addAtkRange; } set { _addAtkRange = value; } } /// - /// + /// 附加属性:角色生命值 /// public int AddHeroHp { get { return _addHeroHp; } set { _addHeroHp = value; } } /// - /// + /// 附加属性:角色魔法值 /// public int AddHeroMp { get { return _addHeroMp; } set { _addHeroMp = value; } } /// - /// + /// 附加属性:角色生命值恢复 /// public int AddReturnHp { get { return _addReturnHp; } set { _addReturnHp = value; } } /// - /// + /// 附加属性:角色魔法值恢复 /// public int AddReturnMp { get { return _addReturnMp; } set { _addReturnMp = value; } } /// -- Gitee