From 08f96766b887bea8b208382100ac4d36f5c479c5 Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Sat, 4 Jan 2025 14:54:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9C=A8=E8=98=91=E8=8F=87=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meng_yao/Assets/Prefabs/charatar/mmg.prefab | 10 ++-- .../A_fightin/mmg_Ani/Stand/mmg_Attack.anim | 2 +- meng_yao/Assets/Scenes/scene_Main.unity | 12 ++-- meng_yao/Assets/common | 2 +- .../script/A_Fight/SkillUp/mmg_SkillUp.cs | 59 +++++++++++++++++++ .../A_Fight/SkillUp/mmg_SkillUp.cs.meta | 11 ++++ 6 files changed, 83 insertions(+), 13 deletions(-) create mode 100644 meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs create mode 100644 meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs.meta diff --git a/meng_yao/Assets/Prefabs/charatar/mmg.prefab b/meng_yao/Assets/Prefabs/charatar/mmg.prefab index 47e6cd2f..2e93a923 100644 --- a/meng_yao/Assets/Prefabs/charatar/mmg.prefab +++ b/meng_yao/Assets/Prefabs/charatar/mmg.prefab @@ -361,7 +361,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 90e9cd2fc0a74084fbf1a89015db94a9, type: 3} m_Name: m_EditorClassIdentifier: - bulletPrefab: {fileID: 900173028918561104, guid: 99830c598e775fb42b39abf253c5f084, type: 3} + bulletPrefab: {fileID: 900173028918561104, guid: c7974614ec6f2d049b979213fb16ada5, type: 3} role: {fileID: 8433650274028726420} damageTyp: 2 attackCooldown: 1 @@ -414,7 +414,7 @@ GameObject: - component: {fileID: 8433650274028726420} - component: {fileID: -3836672401185760439} - component: {fileID: 1608620729910401442} - - component: {fileID: 3258498600701209889} + - component: {fileID: 8431660328256440042} m_Layer: 0 m_Name: mmg m_TagString: Player @@ -509,7 +509,7 @@ MonoBehaviour: normalIndex: 0 isHit: 0 myTags: 0 - mySkillUp: {fileID: 3258498600701209889} + mySkillUp: {fileID: 8431660328256440042} IsDead: 0 HaveDieTime: 0 enemyId: @@ -566,7 +566,7 @@ MonoBehaviour: m_EditorClassIdentifier: tower: {fileID: 0} Tag: tower ---- !u!114 &3258498600701209889 +--- !u!114 &8431660328256440042 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -575,7 +575,7 @@ MonoBehaviour: m_GameObject: {fileID: 8433650275485930554} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cf06a056a8f837740a4fca76de3a5ed5, type: 3} + m_Script: {fileID: 11500000, guid: 4343d5a9d3f9c4246bb691da4aaa144d, type: 3} m_Name: m_EditorClassIdentifier: retbutton: {fileID: 0} diff --git a/meng_yao/Assets/Resources/animation/A_fightin/mmg_Ani/Stand/mmg_Attack.anim b/meng_yao/Assets/Resources/animation/A_fightin/mmg_Ani/Stand/mmg_Attack.anim index 2df53d7c..85e26d4a 100644 --- a/meng_yao/Assets/Resources/animation/A_fightin/mmg_Ani/Stand/mmg_Attack.anim +++ b/meng_yao/Assets/Resources/animation/A_fightin/mmg_Ani/Stand/mmg_Attack.anim @@ -154,7 +154,7 @@ AnimationClip: m_HasMotionFloatCurves: 0 m_Events: - time: 0.73333335 - functionName: ShootBullet + functionName: ShanXingAttack data: objectReferenceParameter: {fileID: 0} floatParameter: 0 diff --git a/meng_yao/Assets/Scenes/scene_Main.unity b/meng_yao/Assets/Scenes/scene_Main.unity index f66245a0..9f89361a 100644 --- a/meng_yao/Assets/Scenes/scene_Main.unity +++ b/meng_yao/Assets/Scenes/scene_Main.unity @@ -31606,27 +31606,27 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 600 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 733 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -366.5 objectReference: {fileID: 0} - target: {fileID: 3011360593759919820, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchorMax.y diff --git a/meng_yao/Assets/common b/meng_yao/Assets/common index f1d82193..5788bda1 160000 --- a/meng_yao/Assets/common +++ b/meng_yao/Assets/common @@ -1 +1 @@ -Subproject commit f1d8219300474f47b57fcf3d3867062dfde97d80 +Subproject commit 5788bda1d2bc278bb1ab1a288344c13c16db84a0 diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs new file mode 100644 index 00000000..da9305cb --- /dev/null +++ b/meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs @@ -0,0 +1,59 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class mmg_SkillUp : SkillUp +{ + /// + ///攻击CD减少25% + /// + public override void Skill_1_1() + { + base.AttackCooldown -= 0.25f; + + } + /// + /// 射程提升2格位置,攻击CD增加5% + /// + public override void Skill_1_3() + { + + AttackCooldown += 0.05f; + base.AttackRange = 2; + attack.SetAttackRange(); + } + /// + /// 增加子弹20%飞行速度,攻击CD增加5% + /// + public override void Skill_1_5() + { + AttackCooldown += 0.05f; + base.attack.roleBulletSpeedAdd += 0.2f; + } + + + /// + /// 每次射击2个子弹,增加扇形攻击范围 + /// + public override void Skill_2_1() + { + base.attack.BulletNumber += 2; + base.attack.Angle += 20; + } + /// + /// 对小型敌人增加25%伤害,攻击CD增加5% + /// + public override void Skill_2_3() + { + base.DamageOfMin += 0.25f; + AttackCooldown += 0.05f; + } + /// + /// 对小型敌人增加40%伤害,攻击CD增加5% + /// + public override void Skill_2_5() + { + base.DamageOfMin += 0.4f; + base.AttackCooldown += 0.05f; + } +} diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs.meta b/meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs.meta new file mode 100644 index 00000000..8366e1f9 --- /dev/null +++ b/meng_yao/Assets/script/A_Fight/SkillUp/mmg_SkillUp.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4343d5a9d3f9c4246bb691da4aaa144d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 11f8b4fa603f8bb9f22ca3717b538b857a2af7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8F=B7=E6=95=AC?= <153802103@qq.com> Date: Sat, 4 Jan 2025 15:08:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B2=9B=E4=B8=BB=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/scene_Main/Islandownerbidding.meta | 8 ++++ .../Islandownerbidding/Auctioncertificate.cs | 45 ++++++++++++++++++ .../Auctioncertificate.cs.meta | 11 +++++ .../Islandownerbidding/Auctioninformation.cs | 46 +++++++++++++++++++ .../Auctioninformation.cs.meta | 11 +++++ .../Islandownerbidding/Islandownerbidding.cs | 46 +++++++++++++++++++ .../Islandownerbidding.cs.meta | 11 +++++ 7 files changed, 178 insertions(+) create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding.meta create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs.meta create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs.meta create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs create mode 100644 meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs.meta diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding.meta b/meng_yao/Assets/script/scene_Main/Islandownerbidding.meta new file mode 100644 index 00000000..b7256da0 --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff6b29309c45aaa4da821da053e0861c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs new file mode 100644 index 00000000..3654bb2a --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs @@ -0,0 +1,45 @@ +using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; + +public class Auctioncertificate: MonoBehaviour +{ + public Dictionary CreateHeaders() + { + if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token)) + { + Debug.LogWarning("尝试创建请求头时,token 未设置。"); + return new Dictionary(); + } + return new Dictionary + { + + { "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token }, + { "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" } + }; + } + public async Task Island() + { + string response = await myWeb.SendRequest(myWeb.URL + "/api/island/cert_list", "GET", "{}", CreateHeaders()); + Debug.Log("岛主证书" + response); + certificateResponse certificate = JsonConvert.DeserializeObject(response); + //Debug.Log(teamInfo.Data.Info.Nickname); + return certificate; + } +} + +public class certificateResponse +{ + public certificateData Data { get; set; } +} +public class certificateData +{ + public string uid { get; set; } + public string nickname { get; set; } + public string serial_no { get; set; } + public int copies { get; set; } + public string island_name { get; set; } + public string issue_date { get; set; } +} \ No newline at end of file diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs.meta b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs.meta new file mode 100644 index 00000000..5bd1bfab --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioncertificate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: acd9ea8f9fcf28f41ac1fe76a6a7e0a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs new file mode 100644 index 00000000..2f207961 --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; + +public class Auctioninformation: MonoBehaviour +{ + public Dictionary CreateHeaders() + { + if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token)) + { + Debug.LogWarning("尝试创建请求头时,token 未设置。"); + return new Dictionary(); + } + return new Dictionary + { + + { "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token }, + { "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" } + }; + } + public async Task Island(int count) + { + + string response = await myWeb.SendRequest(myWeb.URL + "/api/island/submit", "GET", "{}", CreateHeaders()); + Debug.Log("岛主信息" + response); + AuctionResponse Island = JsonConvert.DeserializeObject(response); + //Debug.Log(teamInfo.Data.Info.Nickname); + return Island; + } +} + +public class AuctionResponse +{ + public AuctionData Data { get; set; } +} +public class AuctionData +{ + public int gold { get; set; } + public string intro_text { get; set; } + public int countdown { get; set; } + public int island_id { get; set; } + public string island_name { get; set; } + public int invest_total { get; set; } +} \ No newline at end of file diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs.meta b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs.meta new file mode 100644 index 00000000..5fb80743 --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Auctioninformation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82907bb754fe74643be310ebe0654f63 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs new file mode 100644 index 00000000..387843f5 --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; + +public class Islandownerbidding: MonoBehaviour +{ + public Dictionary CreateHeaders() + { + if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token)) + { + Debug.LogWarning("尝试创建请求头时,token 未设置。"); + return new Dictionary(); + } + return new Dictionary + { + + { "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token }, + { "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" } + }; + } + public async Task Island(Islandbody islandbody) + { + Debug.Log("岛主竞拍入参" + JsonConvert.SerializeObject(islandbody)); + string response = await myWeb.SendRequest(myWeb.URL + "/api/island/info", "POST", JsonConvert.SerializeObject(islandbody), CreateHeaders()); + Debug.Log("岛主竞拍" + response); + IslandResponse Island = JsonConvert.DeserializeObject(response); + //Debug.Log(teamInfo.Data.Info.Nickname); + return Island; + } +} + +public class Islandbody +{ + public int count; +} +public class IslandResponse +{ + public IslandData Data { get; set; } +} +public class IslandData +{ + public int balance { get; set; } + public int invest_total { get; set; } +} \ No newline at end of file diff --git a/meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs.meta b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs.meta new file mode 100644 index 00000000..d967bd14 --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Islandownerbidding/Islandownerbidding.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70cf240f9a42b134181a608af77f0995 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: