From ea0db7ec8b3fceb90054e1b7dfbfb8832f1a015f Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Wed, 8 Jan 2025 14:55:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8A=80=E8=83=BD=E8=AF=BB=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meng_yao/Assets/Config/MengYao_Skill_Date.txt | 49 +++++++++++++++++-- meng_yao/Assets/Prefabs/charatar/cs.prefab | 27 +++++++--- meng_yao/Assets/Scenes/scene_Main.unity | 12 ++--- .../Assets/script/A_Fight/SkillUp/SkillUp.cs | 20 +++++++- 4 files changed, 90 insertions(+), 18 deletions(-) diff --git a/meng_yao/Assets/Config/MengYao_Skill_Date.txt b/meng_yao/Assets/Config/MengYao_Skill_Date.txt index e8ce669b..784f733b 100644 --- a/meng_yao/Assets/Config/MengYao_Skill_Date.txt +++ b/meng_yao/Assets/Config/MengYao_Skill_Date.txt @@ -21,9 +21,7 @@ }, "M_H_001_S_2": { "1": { - "SkillList": [ - "skill_1" - ], + "numberOfBullets":3, "DamageBuff": -0.5 }, "2": { @@ -43,5 +41,50 @@ "AttackContinues": 0.5 } } + }, + "M_S_002": { + "S_1": { + "1": { + "Range":2 + }, + "2": { + "DamageBuff": 0.15 + }, + "3": { + "SkillList": ["skill_0"], + "Range": -1 + }, + "4": { + "DamageBuff": 0.35 + }, + "5": { + "AttackCooldown": -0.5, + "AttackContinues":-0.5 + } + }, + "S_2": { + "1": { + "SkillList": [ + "skill_1" + ], + "DamageBuff": -0.5 + }, + "2": { + "DamageBuff": 0.15 + }, + "3": { + "SkillList": [ + + ], + "AttackCooldown": 0.05 + }, + "4": { + "DamageBuff": 0.35 + }, + "5": { + "AttackCooldown": 0.3, + "AttackContinues": 0.5 + } + } } } \ No newline at end of file diff --git a/meng_yao/Assets/Prefabs/charatar/cs.prefab b/meng_yao/Assets/Prefabs/charatar/cs.prefab index 6d6044e8..a966f0e4 100644 --- a/meng_yao/Assets/Prefabs/charatar/cs.prefab +++ b/meng_yao/Assets/Prefabs/charatar/cs.prefab @@ -379,9 +379,17 @@ MonoBehaviour: AttackStayTime: 0 Target: {fileID: 0} characterClick: {fileID: 8274433498955506092} + Angle: 30 + splitNum: 2 + SplitAttack: 10 + RunRange: 3 + haveAddDamage: 0 + AdddamageType: 1 + BoomRange: 1 isAttack: 1 flag: 0 timer: 0 + bulletLengthAdd: 0 --- !u!58 &1338343970434073545 CircleCollider2D: m_ObjectHideFlags: 0 @@ -411,7 +419,7 @@ GameObject: - component: {fileID: 8433650274028726420} - component: {fileID: -3836672401185760439} - component: {fileID: 1608620729910401442} - - component: {fileID: 240639004111058784} + - component: {fileID: 9193493729303509905} m_Layer: 0 m_Name: cs m_TagString: Player @@ -462,8 +470,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1d85d2602d10e0b45820f1be35eda782, type: 3} m_Name: m_EditorClassIdentifier: - retbutton: {fileID: 0} - ClosureObj: {fileID: 0} + description: id: M_T_002 Name: "\u571F\u840C\u5996-02" camp: 0 @@ -487,6 +494,7 @@ MonoBehaviour: CritRate: 0.05 CriticalHitRateBonus: 0 killNum: 0 + isMoFa: 0 gold: 10 MaxAttack: 8 MinAttack: 6 @@ -506,22 +514,25 @@ MonoBehaviour: normalIndex: 0 isHit: 0 myTags: 0 - mySkillUp: {fileID: 240639004111058784} + mySkillUp: {fileID: 9193493729303509905} IsDead: 0 HaveDieTime: 0 enemyId: + bulletAttackType: 0 moveSpeed: 0 MengyaoSprite: {fileID: 21300000, guid: 602511914339bfa4896fd45f36054865, type: 3} SkillSprites: - {fileID: 21300000, guid: 0adb087419dd674498495bad0175fc85, type: 3} - {fileID: 21300000, guid: d899198e4c5678843aa5f2143bbc226f, type: 3} harmNumber: 0 + isSlowed: 0 Defense: 0 DamageToPlayer: 0 HealthPerLevel: 0 DefensePerLevel: 0 elementType: 4 defenseType: 0 + index: 0 --- !u!61 &-3836672401185760439 BoxCollider2D: m_ObjectHideFlags: 0 @@ -562,7 +573,7 @@ MonoBehaviour: m_EditorClassIdentifier: tower: {fileID: 0} Tag: tower ---- !u!114 &240639004111058784 +--- !u!114 &9193493729303509905 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -571,11 +582,10 @@ MonoBehaviour: m_GameObject: {fileID: 8433650275485930554} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 95b03e0e868ee84449f3fbfa7423a3a5, type: 3} + m_Script: {fileID: 11500000, guid: 8264f0a4afc0aa347bf9dad42df2617a, type: 3} m_Name: m_EditorClassIdentifier: - retbutton: {fileID: 0} - ClosureObj: {fileID: 0} + description: "\u66F4\u65B0\u540E\u7684\u840C\u8000\uFF0C\uFF1A\u4F7F\u7528\u65B9\u6CD5xxxxxxxx" role: {fileID: 8433650274028726420} attack: {fileID: 7276635428522831207} attackRange: 0 @@ -590,3 +600,4 @@ MonoBehaviour: DamageOfland: 0 DamageOfBig: 0 DamageOfMin: 0 + DamageOfSlow: 0 diff --git a/meng_yao/Assets/Scenes/scene_Main.unity b/meng_yao/Assets/Scenes/scene_Main.unity index 1150fb79..49273dd1 100644 --- a/meng_yao/Assets/Scenes/scene_Main.unity +++ b/meng_yao/Assets/Scenes/scene_Main.unity @@ -33906,27 +33906,27 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_SizeDelta.x - value: 600 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_SizeDelta.y - value: 733 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchoredPosition.x - value: 300 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_AnchoredPosition.y - value: -366.5 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3011360593729086421, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3} propertyPath: m_Sprite diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs index 9227a356..ee89f621 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs @@ -88,6 +88,8 @@ public class SkillUp : Fun // 存储技能加成效果 private Dictionary> skillUpgrades = new Dictionary>(); + //Action decelerationBuff; + private void Awake() { description = "更新后的萌耀,:使用方法xxxxxxxx"; @@ -143,6 +145,22 @@ public class SkillUp : Fun role.AddBuff(role.storageBuff, decelerationBuff); //Debug.LogError("使用技能1-3"); } + if (SkillId == "skill_1") + { + NumberOfBullets += 2; + DamageUp += -0.5f; + } + if (SkillId == "skill_2") + { + Action decelerationBuff = CreateSlowDownBuff(0.2f, 3f); + // 将 Buff 添加到玩家的 storageBuff 列表中 + role.AddBuff(role.storageBuff, decelerationBuff); + } + + if (SkillId == "skill_3") + { + + } } } } @@ -155,6 +173,6 @@ public class SkillUp : Fun /// 等级 public void UseSkill(int index, int level) { - Up(role.id, role.id + "_S_" + index.ToString(), level.ToString()); + Up(role.id,"S_" + index.ToString(), level.ToString()); } } \ No newline at end of file From b62560c8857366d08337483131aec2baaf7d39f6 Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Wed, 8 Jan 2025 16:46:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B1=82=E7=BA=A7=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=87=91=E8=9B=BE=E6=94=BB=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Prefabs/Bullet/jbf_Bullet.prefab | 3 +- .../Assets/Prefabs/Bullet/jez_Bullet.prefab | 61 +++++++++---------- meng_yao/Assets/Prefabs/charatar/jez.prefab | 36 ++++++----- .../Assets/script/A_Fight/SpawnMonster.cs | 7 ++- meng_yao/Assets/script/A_Fight/cardContorl.cs | 6 +- 5 files changed, 58 insertions(+), 55 deletions(-) diff --git a/meng_yao/Assets/Prefabs/Bullet/jbf_Bullet.prefab b/meng_yao/Assets/Prefabs/Bullet/jbf_Bullet.prefab index d995351f..a35ff595 100644 --- a/meng_yao/Assets/Prefabs/Bullet/jbf_Bullet.prefab +++ b/meng_yao/Assets/Prefabs/Bullet/jbf_Bullet.prefab @@ -4851,13 +4851,14 @@ MonoBehaviour: BulletDeadTimer: 10 animator: {fileID: 0} IsMove: 1 - Collider2D: {fileID: 0} + Collider2D: {fileID: 4606866971114100020} effectPres: [] NumberOfBulletAttacks: 1 Target: {fileID: 0} noLockEnemy: 0 Cansplit: 0 smallBulletPrefab: {fileID: 0} + CanBoom: 0 --- !u!1 &6998733212867358586 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/Prefabs/Bullet/jez_Bullet.prefab b/meng_yao/Assets/Prefabs/Bullet/jez_Bullet.prefab index 7d0e9e19..f4a5e855 100644 --- a/meng_yao/Assets/Prefabs/Bullet/jez_Bullet.prefab +++ b/meng_yao/Assets/Prefabs/Bullet/jez_Bullet.prefab @@ -11,9 +11,9 @@ GameObject: - component: {fileID: 6998733212867007974} - component: {fileID: 6998733212881238784} - component: {fileID: 6998733212882929672} - - component: {fileID: 5061374960576617222} - component: {fileID: 6519243243911487068} - component: {fileID: 4606866971114100020} + - component: {fileID: 4940721798530711094} m_Layer: 0 m_Name: jez_Bullet m_TagString: Untagged @@ -4804,37 +4804,6 @@ ParticleSystemRenderer: m_MeshWeighting2: 1 m_MeshWeighting3: 1 m_MaskInteraction: 0 ---- !u!114 &5061374960576617222 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6998733212867311352} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 25a4f829952155e48bbe3abf99b78f2e, type: 3} - m_Name: - m_EditorClassIdentifier: - role: {fileID: 0} - attackObj: {fileID: 0} - myBulletType: 0 - bulletAttributes: 0 - bulletMoveType: 0 - BulletDeadTimer: 10 - animator: {fileID: 0} - IsMove: 1 - Collider2D: {fileID: 0} - effectPres: - - {fileID: 1091443316701177648, guid: b9df638c9cb3bfe43acb042655fd517e, type: 3} - - {fileID: 1091443316701177648, guid: 65e205dfab4a6c2458647bb554b62ac2, type: 3} - - {fileID: 1091443316701177648, guid: beeceee8fc2c8464abd22e4b3e7850f1, type: 3} - NumberOfBulletAttacks: 1 - Target: {fileID: 0} - noLockEnemy: 0 - Cansplit: 0 - smallBulletPrefab: {fileID: 0} - CanBoom: 0 --- !u!210 &6519243243911487068 SortingGroup: m_ObjectHideFlags: 0 @@ -4862,6 +4831,34 @@ CircleCollider2D: m_Offset: {x: 0, y: 0} serializedVersion: 2 m_Radius: 0.1 +--- !u!114 &4940721798530711094 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6998733212867311352} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e31ebd3b0b4200f41b0f751131f92e72, type: 3} + m_Name: + m_EditorClassIdentifier: + role: {fileID: 0} + attackObj: {fileID: 0} + myBulletType: 0 + bulletAttributes: 0 + bulletMoveType: 0 + BulletDeadTimer: 10 + animator: {fileID: 0} + IsMove: 1 + Collider2D: {fileID: 0} + effectPres: [] + NumberOfBulletAttacks: 1 + Target: {fileID: 0} + noLockEnemy: 0 + Cansplit: 0 + smallBulletPrefab: {fileID: 0} + CanBoom: 0 --- !u!1 &6998733212867358586 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/Prefabs/charatar/jez.prefab b/meng_yao/Assets/Prefabs/charatar/jez.prefab index 218a0872..30789bc4 100644 --- a/meng_yao/Assets/Prefabs/charatar/jez.prefab +++ b/meng_yao/Assets/Prefabs/charatar/jez.prefab @@ -419,7 +419,7 @@ GameObject: - component: {fileID: 8433650274028726420} - component: {fileID: -3836672401185760439} - component: {fileID: 1608620729910401442} - - component: {fileID: 3258498600701209889} + - component: {fileID: 8624611542137883506} m_Layer: 0 m_Name: jez m_TagString: Player @@ -470,8 +470,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1d85d2602d10e0b45820f1be35eda782, type: 3} m_Name: m_EditorClassIdentifier: - retbutton: {fileID: 0} - ClosureObj: {fileID: 0} + description: id: M_J_004 Name: "\u91D1\u840C\u5996-04" camp: 0 @@ -484,21 +483,21 @@ MonoBehaviour: _Canvas: {fileID: 0} spriteRenderers: {fileID: 0} HurtDirectin: 0 - Quality: 0 - Elements: 2 - Info: "\u5F53\u653B\u51FB\u8303\u56F4\u5185\u51FA\u73B0\u654C\u4EBA\u540E\u5C31\u4F1A\u9501\u5B9A\u654C\u4EBA\uFF0C\u7136\u540E\u6301\u7EED\u5C04\u51FA\u5B50\u5F39\u8FDB\u884C\u653B\u51FB\u3002" - SkillId: 2001 - AttackType: 0 - AttackActionType: 0 - AttackRange: 6 - AttackCD: 0.6 - CritRate: 0.065 + Quality: 2 + Elements: 0 + Info: "\u5C04\u51FA\u4E00\u4E2A\u4F1A\u8FD4\u56DE\u7684\u201C\u56DE\u65CB\u9556\u201D\uFF0C\u653B\u51FB\u79FB\u52A8\u4E2D\u89E6\u78B0\u5230\u7684\u6240\u6709\u654C\u4EBA\u3002" + SkillId: 3001 + AttackType: 2 + AttackActionType: 2 + AttackRange: 5 + AttackCD: 2.5 + CritRate: 0.08 CriticalHitRateBonus: 0 killNum: 0 isMoFa: 0 gold: 10 - MaxAttack: 6 - MinAttack: 4 + MaxAttack: 12 + MinAttack: 10 isGoodDamege: 0 physicalArmor: 10 magicArmor: 5 @@ -515,7 +514,7 @@ MonoBehaviour: normalIndex: 0 isHit: 0 myTags: 0 - mySkillUp: {fileID: 3258498600701209889} + mySkillUp: {fileID: 8624611542137883506} IsDead: 0 HaveDieTime: 0 enemyId: @@ -574,7 +573,7 @@ MonoBehaviour: m_EditorClassIdentifier: tower: {fileID: 0} Tag: tower ---- !u!114 &3258498600701209889 +--- !u!114 &8624611542137883506 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -583,11 +582,10 @@ MonoBehaviour: m_GameObject: {fileID: 8433650275485930554} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cf06a056a8f837740a4fca76de3a5ed5, type: 3} + m_Script: {fileID: 11500000, guid: 8264f0a4afc0aa347bf9dad42df2617a, type: 3} m_Name: m_EditorClassIdentifier: - retbutton: {fileID: 0} - ClosureObj: {fileID: 0} + description: "\u66F4\u65B0\u540E\u7684\u840C\u8000\uFF0C\uFF1A\u4F7F\u7528\u65B9\u6CD5xxxxxxxx" role: {fileID: 8433650274028726420} attack: {fileID: 7276635428522831207} attackRange: 0 diff --git a/meng_yao/Assets/script/A_Fight/SpawnMonster.cs b/meng_yao/Assets/script/A_Fight/SpawnMonster.cs index 6ebc3207..f06ea356 100644 --- a/meng_yao/Assets/script/A_Fight/SpawnMonster.cs +++ b/meng_yao/Assets/script/A_Fight/SpawnMonster.cs @@ -28,6 +28,8 @@ public class SpawnMonster : Base public List enemysList=new List(); + public List MengYaoList = new List(); + public List SortList = new List(); private void Awake() { @@ -46,8 +48,9 @@ public class SpawnMonster : Base { // 获取所有带有 SortingGroup 组件的敌人对象 List gameObjectsList = new List(); - - foreach (GameObject go in enemysList) + SortList.AddRange(enemysList); + SortList.AddRange(MengYaoList); + foreach (GameObject go in SortList) { // 获取该物体上的 SortingGroup 组件 if (go != null) diff --git a/meng_yao/Assets/script/A_Fight/cardContorl.cs b/meng_yao/Assets/script/A_Fight/cardContorl.cs index 71e2c112..0d59f5fc 100644 --- a/meng_yao/Assets/script/A_Fight/cardContorl.cs +++ b/meng_yao/Assets/script/A_Fight/cardContorl.cs @@ -86,7 +86,11 @@ public class cardContorl : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndD MengyaoInfo.Instance.mengyaoIdToRole.Add(mY.GetComponent().id, mY); //SpawnPool.intance.Enemys.Add(mY);//瀛樺叆鍥惧眰鎺掑簭鐨勬暟缁 - + if (!SpawnMonster.intance.MengYaoList.Contains(mY)) + { + SpawnMonster.intance.MengYaoList.Add(mY); + } + this.enabled = false; cardBox.instance.ChangeInPlaceNumber(1);