From 5531bcfab92d0e84a9e6382f004afea3e4cfcb15 Mon Sep 17 00:00:00 2001 From: yjm484 <171359351@qq.com> Date: Sat, 5 Jul 2025 04:13:57 +0800 Subject: [PATCH] =?UTF-8?q?0705=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Upgrade for URP.unitypackage.meta | 7 - .../Assets/Plugins/Microsoft.CSharp.dll.meta | 27 + .../Assets/Scripts/Buff/Buff.cs | 7 +- .../Assets/Scripts/Buff/Buff_AcidRain.cs | 2 +- .../Assets/Scripts/Buff/Buff_Armor.cs | 2 +- .../Assets/Scripts/Buff/Buff_BanStepRange.cs | 6 - .../Assets/Scripts/Buff/Buff_Bleed.cs | 2 +- .../Scripts/Buff/Buff_Bleed3TurnCost.cs | 2 +- .../Scripts/Buff/Buff_Bleed4TurnCost.cs | 2 +- .../Assets/Scripts/Buff/Buff_BleedDamage.cs | 2 +- .../Assets/Scripts/Buff/Buff_BleedHeal.cs | 2 +- .../Assets/Scripts/Buff/Buff_BlueNode.cs | 2 +- .../Assets/Scripts/Buff/Buff_BonePile.cs | 2 +- .../Assets/Scripts/Buff/Buff_Boom.cs | 2 +- .../Assets/Scripts/Buff/Buff_BoomAndDamage.cs | 5 +- .../Scripts/Buff/Buff_BoomAndPollute.cs | 2 +- .../Assets/Scripts/Buff/Buff_BoundSoul.cs | 2 +- .../Assets/Scripts/Buff/Buff_Calm.cs | 2 +- .../Assets/Scripts/Buff/Buff_CantShield.cs | 2 +- .../Buff/Buff_ContaminatusImmortalis.cs | 2 +- .../Assets/Scripts/Buff/Buff_DeathMark.cs | 2 +- .../Assets/Scripts/Buff/Buff_Disable.cs | 5 - .../Assets/Scripts/Buff/Buff_DoubleSettle.cs | 2 +- .../Assets/Scripts/Buff/Buff_DownAnger.cs | 5 - .../Assets/Scripts/Buff/Buff_DownShield.cs | 5 - .../Assets/Scripts/Buff/Buff_DownStepRange.cs | 2 +- .../Scripts/Buff/Buff_EmberDownOneTurn.cs | 2 +- .../Assets/Scripts/Buff/Buff_EnemyNode.cs | 2 +- .../Assets/Scripts/Buff/Buff_FailedSample.cs | 2 +- .../Assets/Scripts/Buff/Buff_FireSeed.cs | 2 +- .../Assets/Scripts/Buff/Buff_FireShield.cs | 6 - .../Assets/Scripts/Buff/Buff_Firm.cs | 2 +- .../Scripts/Buff/Buff_HalfDamageInBlack.cs | 2 +- .../Assets/Scripts/Buff/Buff_Immunity.cs | 2 +- .../Assets/Scripts/Buff/Buff_LivingArmor.cs | 2 +- .../Scripts/Buff/Buff_NextTurnExtraOneCost.cs | 2 +- .../Assets/Scripts/Buff/Buff_Pharmacist.cs | 2 +- .../Scripts/Buff/Buff_PollutionSpreader.cs | 2 +- .../Assets/Scripts/Buff/Buff_Posion.cs | 13 +- .../Scripts/Buff/Buff_PrismReflector.cs | 2 +- .../Assets/Scripts/Buff/Buff_RatWarrior.cs | 2 +- .../Scripts/Buff/Buff_ReconnaissanceBee.cs | 2 +- .../Assets/Scripts/Buff/Buff_RedNode.cs | 2 +- .../Assets/Scripts/Buff/Buff_Shedding.cs | 2 +- .../Assets/Scripts/Buff/Buff_SoulMaker.cs | 2 +- .../Assets/Scripts/Buff/Buff_StonePillar.cs | 2 +- .../Assets/Scripts/Buff/Buff_StoneSkin.cs | 2 +- .../Assets/Scripts/Buff/Buff_Thief.cs | 2 +- .../Assets/Scripts/Buff/Buff_Thorn.cs | 2 +- .../Assets/Scripts/Buff/Buff_Thrifty.cs | 2 +- .../Assets/Scripts/Buff/Buff_Twinbee.cs | 2 +- .../Assets/Scripts/Buff/Buff_UpperAnger.cs | 2 +- .../Assets/Scripts/Buff/Buff_UpperShield.cs | 2 +- .../Scripts/Buff/Buff_UpperStepRange.cs | 2 +- .../Assets/Scripts/Buff/Buff_Vulnerable.cs | 5 - .../Assets/Scripts/Buff/Buff_Weak.cs | 6 - .../Assets/Scripts/Buff/Buff_Wet.cs | 2 +- .../Assets/Scripts/Buff/Buff_YellowNode.cs | 2 +- .../Assets/Scripts/Buff/Buff_coma.cs | 2 +- .../Assets/Scripts/Buff/Buff_corrode.cs | 2 +- .../Assets/Scripts/Buff/Buff_disarm.cs | 5 - .../Assets/Scripts/Buff/Buff_flashPoint.cs | 2 +- .../Assets/Scripts/Buff/Buff_levelSeep.cs | 4 - .../Assets/Scripts/Buff/Buff_parasitism.cs | 2 +- .../Assets/Scripts/Buff/Buff_sleep.cs | 5 - .../Assets/Scripts/Card/CardDrag.cs | 39 +- .../Assets/Scripts/Card/TurnMaster.cs | 16 +- .../Assets/Scripts/Enemy/AcidRainCloud.cs | 180 -- .../Scripts/Enemy/AcidRainCloud.cs.meta | 11 - .../Assets/Scripts/Enemy/BoundSoul.cs | 165 -- .../Assets/Scripts/Enemy/BoundSoul.cs.meta | 11 - .../Assets/Scripts/Enemy/Climavista.cs | 186 -- .../Assets/Scripts/Enemy/Climavista.cs.meta | 11 - .../Scripts/Enemy/ContaminatusImmortalis.cs | 137 -- .../Enemy/ContaminatusImmortalis.cs.meta | 11 - .../Assets/Scripts/Enemy/Enemy.cs | 559 ----- .../Assets/Scripts/Enemy/Enemy.cs.meta | 11 - .../Assets/Scripts/Enemy/EnemyManager.cs | 640 ------ .../Assets/Scripts/Enemy/EnemyManager.cs.meta | 11 - .../Assets/Scripts/Enemy/EnemyNode.cs | 2039 ----------------- .../Assets/Scripts/Enemy/EnemyNode.cs.meta | 11 - .../Enemy/EnemyUI/Enemy/EnemyAimLine.cs | 77 - .../Enemy/EnemyUI/Enemy/EnemyAimLine.cs.meta | 11 - .../Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs | 193 -- .../Enemy/EnemyUI/Enemy/EnemyUIBar.cs.meta | 11 - .../Assets/Scripts/Enemy/FailedSample.cs | 155 -- .../Assets/Scripts/Enemy/FailedSample.cs.meta | 11 - .../Assets/Scripts/Enemy/Gravitus.cs | 203 -- .../Assets/Scripts/Enemy/Gravitus.cs.meta | 11 - .../Scripts/Enemy/Item/BlockNode/BlockNode.cs | 50 - .../Enemy/Item/BlockNode/BlockNode.cs.meta | 11 - .../Scripts/Enemy/Item/BlockNode/Boom.cs | 141 -- .../Scripts/Enemy/Item/BlockNode/Boom.cs.meta | 11 - .../Scripts/Enemy/Item/BlockNode/Box.cs | 51 - .../Scripts/Enemy/Item/BlockNode/Box.cs.meta | 11 - .../Scripts/Enemy/Item/BlockNode/TNTBucket.cs | 59 - .../Enemy/Item/BlockNode/TNTBucket.cs.meta | 11 - .../Scripts/Enemy/Item/BlockNode/Tree.cs | 40 - .../Scripts/Enemy/Item/BlockNode/Tree.cs.meta | 11 - .../Scripts/Enemy/Item/BlockNode/Vacancy.cs | 25 - .../Enemy/Item/BlockNode/Vacancy.cs.meta | 11 - .../Item/TakerOverNode/ItemTakerOverNode.cs | 35 - .../Assets/Scripts/Enemy/Leviathan.cs | 195 -- .../Assets/Scripts/Enemy/Leviathan.cs.meta | 11 - .../Assets/Scripts/Enemy/LivingArmor.cs | 216 -- .../Assets/Scripts/Enemy/LivingArmor.cs.meta | 11 - .../Assets/Scripts/Enemy/Pharmacist.cs | 231 -- .../Assets/Scripts/Enemy/Pharmacist.cs.meta | 11 - .../Assets/Scripts/Enemy/Pollutinel.cs | 220 -- .../Assets/Scripts/Enemy/Pollutinel.cs.meta | 11 - .../Assets/Scripts/Enemy/PollutionSpreader.cs | 254 -- .../Scripts/Enemy/PollutionSpreader.cs.meta | 11 - .../Assets/Scripts/Enemy/PrismReflector.cs | 172 -- .../Scripts/Enemy/PrismReflector.cs.meta | 11 - .../Assets/Scripts/Enemy/RatWarrior.cs | 176 -- .../Assets/Scripts/Enemy/RatWarrior.cs.meta | 11 - .../Assets/Scripts/Enemy/ReconnaissanceBee.cs | 204 -- .../Scripts/Enemy/ReconnaissanceBee.cs.meta | 11 - .../Assets/Scripts/Enemy/SoulMaker.cs | 177 -- .../Assets/Scripts/Enemy/SoulMaker.cs.meta | 11 - .../Assets/Scripts/Enemy/StonePillar.cs | 136 -- .../Assets/Scripts/Enemy/StonePillar.cs.meta | 11 - .../Assets/Scripts/Enemy/Thief.cs | 247 -- .../Assets/Scripts/Enemy/Thief.cs.meta | 11 - .../Assets/Scripts/Enemy/Twinbee.cs | 145 -- .../Assets/Scripts/Enemy/Twinbee.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/AshBeetle.cs | 215 -- .../Scripts/Enemy/V0.1/AshBeetle.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/BlackSheep.cs | 75 - .../Scripts/Enemy/V0.1/BlackSheep.cs.meta | 11 - .../Scripts/Enemy/V0.1/BlastFistMushroom.cs | 213 -- .../Enemy/V0.1/BlastFistMushroom.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/Bone.cs | 81 - .../Assets/Scripts/Enemy/V0.1/Bone.cs.meta | 11 - .../Scripts/Enemy/V0.1/CorrosiveSludge.cs | 233 -- .../Enemy/V0.1/CorrosiveSludge.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/DarkCloud.cs | 342 --- .../Scripts/Enemy/V0.1/DarkCloud.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs | 212 -- .../Scripts/Enemy/V0.1/DrowsyShroom.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/EmberWraith.cs | 229 -- .../Scripts/Enemy/V0.1/EmberWraith.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/EnemyName.cs | 22 - .../Scripts/Enemy/V0.1/EnemyName.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/Grinfiend.cs | 351 --- .../Scripts/Enemy/V0.1/Grinfiend.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/HoodWanderer.cs | 260 --- .../Scripts/Enemy/V0.1/HoodWanderer.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/Mushroom.cs | 418 ---- .../Scripts/Enemy/V0.1/Mushroom.cs.meta | 11 - .../Scripts/Enemy/V0.1/ParasiticMushroom.cs | 264 --- .../Enemy/V0.1/ParasiticMushroom.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/Polymaw.cs | 356 --- .../Assets/Scripts/Enemy/V0.1/Polymaw.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/Reward.cs | 46 - .../Assets/Scripts/Enemy/V0.1/Reward.cs.meta | 11 - .../Enemy/V0.1/ShatteringFistMushroom.cs | 268 --- .../Enemy/V0.1/ShatteringFistMushroom.cs.meta | 11 - .../Scripts/Enemy/V0.1/SkullGuardian.cs | 254 -- .../Scripts/Enemy/V0.1/SkullGuardian.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/SkullMage.cs | 268 --- .../Scripts/Enemy/V0.1/SkullMage.cs.meta | 11 - .../Assets/Scripts/Enemy/V0.1/SkullWarlock.cs | 258 --- .../Scripts/Enemy/V0.1/SkullWarlock.cs.meta | 11 - .../Assets/Scripts/EnemyPlanFunction.meta | 8 - .../Scripts/EnemyPlanFunction/EnemyAction.cs | 150 -- .../EnemyPlanFunction/EnemyAction.cs.meta | 11 - .../EnemyActionAction_Aoe.cs | 24 - .../EnemyActionAction_Aoe.cs.meta | 11 - .../EnemyActionAction_Attack.cs | 20 - .../EnemyActionAction_Attack.cs.meta | 11 - .../EnemyActionAction_DeBuff.cs | 19 - .../EnemyActionAction_DeBuff.cs.meta | 11 - .../EnemyActionAction_Random.cs | 21 - .../EnemyActionAction_Random.cs.meta | 11 - .../EnemyActionAction_Shield.cs | 21 - .../EnemyActionAction_Shield.cs.meta | 11 - .../EnemyActionAction_Shoot.cs | 24 - .../EnemyActionAction_Shoot.cs.meta | 11 - .../EnemyActionAction_UpBuff.cs | 21 - .../EnemyActionAction_UpBuff.cs.meta | 11 - .../EnemyAction_AttackAndPollution.cs | 14 - .../EnemyAction_AttackAndPollution.cs.meta | 11 - .../EnemyAction_AttackAndShield.cs | 20 - .../EnemyAction_AttackAndShield.cs.meta | 11 - .../EnemyPlanFunction/EnemyAction_BanStep.cs | 13 - .../EnemyAction_BanStep.cs.meta | 11 - .../EnemyPlanFunction/EnemyAction_Nothing.cs | 14 - .../EnemyAction_Nothing.cs.meta | 11 - .../EnemyAction_Parasitism.cs | 13 - .../EnemyAction_Parasitism.cs.meta | 11 - .../EnemyAction_Pollution.cs | 14 - .../EnemyAction_Pollution.cs.meta | 11 - .../EnemyAction_ShieldAndPollution.cs | 14 - .../EnemyAction_ShieldAndPollution.cs.meta | 11 - .../EnemyAction_ShootAndPollute.cs | 24 - .../EnemyAction_ShootAndPollute.cs.meta | 11 - .../EnemyPlanFunction/EnemyAction_Sleep.cs | 14 - .../EnemyAction_Sleep.cs.meta | 11 - .../EnemyPlanFunction/EnemyAction_Spell.cs | 14 - .../EnemyAction_Spell.cs.meta | 11 - .../EnemyAction_SpellAndAttack.cs | 14 - .../EnemyAction_SpellAndAttack.cs.meta | 11 - .../EnemyAction_SpellAndShield.cs | 14 - .../EnemyAction_SpellAndShield.cs.meta | 11 - .../EnemyPlanFunction/EnemyAction_Summon.cs | 14 - .../EnemyAction_Summon.cs.meta | 11 - .../EnemyAction_Vulnerable.cs | 13 - .../EnemyAction_Vulnerable.cs.meta | 11 - .../EnemyPlanFunction/EnemyAction_Weak.cs | 20 - .../EnemyAction_Weak.cs.meta | 11 - .../Scripts/FightReward/RewardManager.cs | 5 +- .../Scripts/Handler/EffectRangeHandler8_1.cs | 4 +- .../Scripts/Handler/EffectRangeHandlerBase.cs | 4 +- .../Assets/Scripts/MapManager.cs | 35 +- .../Assets/Scripts/MapUnity.cs | 7 - .../Assets/Scripts/Player.cs | 25 +- .../Assets/Scripts/Tool/AStar/AStarManager.cs | 4 +- .../Scripts/Tool/Interface/IEnemyObserver.cs | 1 - .../Assets/Scripts/Tool/MathTool.cs | 9 - .../Assets/Scripts/Tool/getNodeTools.cs | 27 +- .../Assets/Scripts/manager/CardManager.cs | 43 - .../Scripts/manager/EnemyPlanUIManager.cs | 120 - .../manager/EnemyPlanUIManager.cs.meta | 11 - .../Scripts/manager/MapUnitySettleManager.cs | 24 - .../manager/ObjectItemSettleManager.cs | 64 - .../manager/ObjectItemSettleManager.cs.meta | 11 - .../Scripts/manager/SettlementManager.cs | 312 +-- .../Assets/Scripts/manager/Usermanager.cs | 40 +- 229 files changed, 158 insertions(+), 13845 deletions(-) delete mode 100644 ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta create mode 100644 ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs.meta delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs delete mode 100644 ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs.meta diff --git a/ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta b/ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta deleted file mode 100644 index 1d182472..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5b07afdbcf13e43438545d591cfd2e4b -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta b/ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta new file mode 100644 index 00000000..17bba4e5 --- /dev/null +++ b/ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: a94cf6fef2879da4c91e5ef768aadf4e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff.cs index f287076c..97ebae21 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff.cs @@ -16,13 +16,13 @@ public class Buff value --; count= 0; } - public virtual void SettleEnemy(EnemyNode enemyNode) + public virtual void SettleEnemy() { value--; count = 0; } - public virtual void SettleEnemyBegin(EnemyNode enemyNode) + public virtual void SettleEnemyBegin() { } @@ -47,11 +47,10 @@ public class Buff buff.transform.GetChild(2).GetComponent().text = Usermanager.playerAbnormalCondition[key].value.ToString(); } - public virtual void EnemyUIShow(GameObject buff, string key,EnemyNode enemyNode) + public virtual void EnemyUIShow(GameObject buff, string key) { if (icon != null) buff.transform.GetChild(0).GetComponent().sprite = icon; - buff.transform.GetChild(2).GetComponent().text = enemyNode.EnemyState.abnormalCondition[key].value.ToString(); } public virtual Buff NewBuff(int value ) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_AcidRain.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_AcidRain.cs index cbae2227..a92fa4b3 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_AcidRain.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_AcidRain.cs @@ -12,7 +12,7 @@ public class Buff_AcidRain : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Armor.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Armor.cs index 1f4d3571..58874007 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Armor.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Armor.cs @@ -10,7 +10,7 @@ public class Buff_Armor : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BanStepRange.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BanStepRange.cs index f034a92b..82b33020 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BanStepRange.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BanStepRange.cs @@ -16,12 +16,6 @@ public class Buff_BanStepRange : Buff base.UIShow(buff,key); } - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - - } public override Buff NewBuff(int value) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed.cs index d12dd8d9..ae6967d2 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed.cs @@ -12,7 +12,7 @@ public class Buff_Bleed : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed3TurnCost.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed3TurnCost.cs index d486469d..0e468909 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed3TurnCost.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed3TurnCost.cs @@ -13,7 +13,7 @@ public class Buff_Bleed3TurnCost : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { count = 0; } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed4TurnCost.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed4TurnCost.cs index b985f464..bcda8106 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed4TurnCost.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Bleed4TurnCost.cs @@ -12,7 +12,7 @@ public class Buff_Bleed4TurnCost : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { count = 0; } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedDamage.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedDamage.cs index 3ab3f4a1..f7e9d503 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedDamage.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedDamage.cs @@ -12,7 +12,7 @@ public class Buff_BleedDamage : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedHeal.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedHeal.cs index 0ad6f68d..9eb8fd93 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedHeal.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BleedHeal.cs @@ -12,7 +12,7 @@ public class Buff_BleedHeal : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BlueNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BlueNode.cs index 59db68f6..48205474 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BlueNode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BlueNode.cs @@ -12,7 +12,7 @@ public class Buff_BlueNode : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BonePile.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BonePile.cs index e5b02b10..635ecff4 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BonePile.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BonePile.cs @@ -12,7 +12,7 @@ public class Buff_BonePile : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { value++; diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Boom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Boom.cs index 746f2815..32646568 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Boom.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Boom.cs @@ -12,7 +12,7 @@ public class Buff_Boom : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndDamage.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndDamage.cs index 62f562fa..9ad68e0b 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndDamage.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndDamage.cs @@ -16,17 +16,16 @@ public class Buff_BoomAndDamage : Buff buff.transform.GetChild(1).GetComponent().text = Usermanager.playerAbnormalCondition[key].value.ToString(); } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { } - public override void EnemyUIShow(GameObject buff, string key, EnemyNode enemyNode) + public override void EnemyUIShow(GameObject buff, string key) { buff.transform.GetChild(0).GetComponent().text = "爆"; - buff.transform.GetChild(1).GetComponent().text = enemyNode.EnemyState.abnormalCondition[key].value.ToString(); } public override Buff NewBuff(int value) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndPollute.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndPollute.cs index 00633894..49f384de 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndPollute.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoomAndPollute.cs @@ -11,7 +11,7 @@ public class Buff_BoomAndPollute : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoundSoul.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoundSoul.cs index 678d5f8f..8b85075b 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoundSoul.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_BoundSoul.cs @@ -12,7 +12,7 @@ public class Buff_BoundSoul : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Calm.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Calm.cs index 96bf1807..86100664 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Calm.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Calm.cs @@ -12,7 +12,7 @@ public class Buff_Calm : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_CantShield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_CantShield.cs index 69df318d..68551ca0 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_CantShield.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_CantShield.cs @@ -8,7 +8,7 @@ public class Buff_CantShield : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ContaminatusImmortalis.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ContaminatusImmortalis.cs index d1fc0674..cd710fb0 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ContaminatusImmortalis.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ContaminatusImmortalis.cs @@ -12,7 +12,7 @@ public class Buff_ContaminatusImmortalis : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DeathMark.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DeathMark.cs index 9b02805c..55f5053e 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DeathMark.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DeathMark.cs @@ -12,7 +12,7 @@ public class Buff_DeathMark : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Disable.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Disable.cs index ed6d63fc..2630bb7f 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Disable.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Disable.cs @@ -12,12 +12,7 @@ public class Buff_Disable : Buff - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - } public override Buff NewBuff(int value) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DoubleSettle.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DoubleSettle.cs index 716a31b4..0533532a 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DoubleSettle.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DoubleSettle.cs @@ -11,7 +11,7 @@ public class Buff_DoubleSettle : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownAnger.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownAnger.cs index 657a36e8..217a7e56 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownAnger.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownAnger.cs @@ -11,12 +11,7 @@ public class Buff_DownAnger :Buff } - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - } public override Buff NewBuff(int value) { Buff buff = new Buff_DownAnger(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownShield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownShield.cs index 8fd836e8..dd4ae6e6 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownShield.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownShield.cs @@ -11,12 +11,7 @@ public class Buff_DownShield : Buff } - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - } public override Buff NewBuff(int value) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownStepRange.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownStepRange.cs index 798fa015..cd3e5a66 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownStepRange.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_DownStepRange.cs @@ -12,7 +12,7 @@ public class Buff_DownStepRange : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EmberDownOneTurn.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EmberDownOneTurn.cs index 33ad2bcb..10f34f01 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EmberDownOneTurn.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EmberDownOneTurn.cs @@ -10,7 +10,7 @@ public class Buff_EmberDownOneTurn : Buff value=0; } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { value = 0; } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EnemyNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EnemyNode.cs index 7859d5db..de5c5e72 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EnemyNode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_EnemyNode.cs @@ -12,7 +12,7 @@ public class Buff_EnemyNode : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FailedSample.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FailedSample.cs index ba6bb41d..81a6acbf 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FailedSample.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FailedSample.cs @@ -12,7 +12,7 @@ public class Buff_FailedSample : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireSeed.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireSeed.cs index 2066662b..f1faa641 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireSeed.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireSeed.cs @@ -11,7 +11,7 @@ public class Buff_FireSeed : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireShield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireShield.cs index b6daecd9..63a578d9 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireShield.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_FireShield.cs @@ -11,12 +11,6 @@ public class Buff_FireShield : Buff } - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - - } public override Buff NewBuff(int value) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Firm.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Firm.cs index 66a0f050..75cf3240 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Firm.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Firm.cs @@ -11,7 +11,7 @@ public class Buff_Firm : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_HalfDamageInBlack.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_HalfDamageInBlack.cs index 9457c5cb..42c21cac 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_HalfDamageInBlack.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_HalfDamageInBlack.cs @@ -11,7 +11,7 @@ public class Buff_HalfDamageInBlack : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Immunity.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Immunity.cs index 037299b6..2c43bd26 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Immunity.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Immunity.cs @@ -15,7 +15,7 @@ public class Buff_Immunity : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_LivingArmor.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_LivingArmor.cs index c5e966cf..4d8d7b82 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_LivingArmor.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_LivingArmor.cs @@ -12,7 +12,7 @@ public class Buff_LivingArmor : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextTurnExtraOneCost.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextTurnExtraOneCost.cs index 63b2bdb3..8c7f6d41 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextTurnExtraOneCost.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextTurnExtraOneCost.cs @@ -11,7 +11,7 @@ public class Buff_NextTurnExtraOneCost : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Pharmacist.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Pharmacist.cs index 2aaff28b..b05cdc08 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Pharmacist.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Pharmacist.cs @@ -12,7 +12,7 @@ public class Buff_Pharmacist : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PollutionSpreader.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PollutionSpreader.cs index 573c5841..d86c0a7a 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PollutionSpreader.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PollutionSpreader.cs @@ -12,7 +12,7 @@ public class Buff_PollutionSpreader : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Posion.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Posion.cs index af7df913..a682c213 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Posion.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Posion.cs @@ -16,29 +16,18 @@ public class Buff_Posion : Buff { } - public override void SettleEnemy( EnemyNode enemyNode ) + public override void SettleEnemy() { } - public override void SettleEnemyBegin(EnemyNode enemyNode) - { - SettleEnemyPosion(enemyNode); - value--; - - } public void SettlePosion() { if (value > 0) Usermanager.Instance.SufferTrueDamage(value); } - public void SettleEnemyPosion(EnemyNode enemyNode) - { - if (value > 0) - enemyNode.sufferTrueDamage(Usermanager.Instance.DamageCalculation(value)); - } public override Buff NewBuff(int value) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PrismReflector.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PrismReflector.cs index 712944af..7d882d51 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PrismReflector.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_PrismReflector.cs @@ -12,7 +12,7 @@ public class Buff_PrismReflector : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RatWarrior.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RatWarrior.cs index ff9f8de5..73ed875c 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RatWarrior.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RatWarrior.cs @@ -12,7 +12,7 @@ public class Buff_RatWarrior : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ReconnaissanceBee.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ReconnaissanceBee.cs index bc6da045..7f3a9dc9 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ReconnaissanceBee.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_ReconnaissanceBee.cs @@ -12,7 +12,7 @@ public class Buff_ReconnaissanceBee : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RedNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RedNode.cs index d93b7c09..9eb81dc7 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RedNode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_RedNode.cs @@ -12,7 +12,7 @@ public class Buff_RedNode : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Shedding.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Shedding.cs index 5df8a8b3..ecf5c900 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Shedding.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Shedding.cs @@ -10,7 +10,7 @@ public class Buff_Shedding : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_SoulMaker.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_SoulMaker.cs index 4e2d655b..e07d4e1e 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_SoulMaker.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_SoulMaker.cs @@ -12,7 +12,7 @@ public class Buff_SoulMaker : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StonePillar.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StonePillar.cs index 9204be39..79287687 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StonePillar.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StonePillar.cs @@ -12,7 +12,7 @@ public class Buff_StonePillar : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StoneSkin.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StoneSkin.cs index 5bf67a26..5afec2e4 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StoneSkin.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_StoneSkin.cs @@ -12,7 +12,7 @@ public class Buff_StoneSkin : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thief.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thief.cs index 0063ce37..eabe4e7a 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thief.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thief.cs @@ -12,7 +12,7 @@ public class Buff_Thief : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thorn.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thorn.cs index c8a650cd..f39c5027 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thorn.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thorn.cs @@ -7,7 +7,7 @@ public class Buff_Thorn : Buff { - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thrifty.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thrifty.cs index 2fc2d734..16117f64 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thrifty.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Thrifty.cs @@ -12,7 +12,7 @@ public class Buff_Thrifty : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Twinbee.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Twinbee.cs index b1f5a1b7..1c38a732 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Twinbee.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Twinbee.cs @@ -12,7 +12,7 @@ public class Buff_Twinbee : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperAnger.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperAnger.cs index 7efd627d..d05cd235 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperAnger.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperAnger.cs @@ -10,7 +10,7 @@ public class Buff_UpperAnger : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperShield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperShield.cs index 1700f527..1b26445b 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperShield.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperShield.cs @@ -11,7 +11,7 @@ public class Buff_UpperShield : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperStepRange.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperStepRange.cs index 00aeb0a4..11d99452 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperStepRange.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_UpperStepRange.cs @@ -12,7 +12,7 @@ public class Buff_UpperStepRange : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Vulnerable.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Vulnerable.cs index 018db5af..01282ad9 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Vulnerable.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Vulnerable.cs @@ -14,12 +14,7 @@ public class Buff_Vulnerable : Buff - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - } public override Buff NewBuff(int value) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Weak.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Weak.cs index fdfb15f2..f9762e47 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Weak.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Weak.cs @@ -13,12 +13,6 @@ public class Buff_Weak : Buff - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - - } public override Buff NewBuff(int value) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Wet.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Wet.cs index dfe99fc7..45a134e8 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Wet.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_Wet.cs @@ -11,7 +11,7 @@ public class Buff_Wet : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { //base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_YellowNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_YellowNode.cs index 3bf3c389..5ee4e1c0 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_YellowNode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_YellowNode.cs @@ -12,7 +12,7 @@ public class Buff_YellowNode : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_coma.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_coma.cs index d77747c3..ad83886c 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_coma.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_coma.cs @@ -11,7 +11,7 @@ public class Buff_coma : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { base.Settle(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_corrode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_corrode.cs index 7e226e2b..dbb530a9 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_corrode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_corrode.cs @@ -12,7 +12,7 @@ public class Buff_corrode : Buff } - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_disarm.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_disarm.cs index 6c023e02..0421fd77 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_disarm.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_disarm.cs @@ -12,12 +12,7 @@ public class Buff_disarm : Buff } - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - } public override Buff NewBuff(int value) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_flashPoint.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_flashPoint.cs index ae197248..b20aebf5 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_flashPoint.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_flashPoint.cs @@ -12,7 +12,7 @@ public class Buff_flashPoint : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_levelSeep.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_levelSeep.cs index 94805c37..f5240eb9 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_levelSeep.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_levelSeep.cs @@ -11,11 +11,7 @@ public class Buff_levelSeep : Buff base.Settle(); } - public override void SettleEnemy(EnemyNode enemyNode) - { - base.Settle(); - } public override Buff NewBuff(int value) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_parasitism.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_parasitism.cs index 21623db8..c8f6ed36 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_parasitism.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_parasitism.cs @@ -12,7 +12,7 @@ public class Buff_parasitism : Buff - public override void SettleEnemy(EnemyNode enemyNode) + public override void SettleEnemy() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_sleep.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_sleep.cs index 26c978e7..85a5801d 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_sleep.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_sleep.cs @@ -12,12 +12,7 @@ public class Buff_sleep : Buff } - public override void SettleEnemy(EnemyNode enemyNode) - { - - base.Settle(); - } public override Buff NewBuff(int value) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs index 7575de55..1b63a52f 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs @@ -268,7 +268,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag //卡牌释放 public void CardUse() { - EnemyManager.Instance.HideExpHP_Observer(); + //EnemyManager.Instance.HideExpHP_Observer(); GameManager.Instance.onDrag = false; //目标释放选择 /*if (!cardTargetCheck()) @@ -491,7 +491,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag CardActiveSort.Instance.ReflashCardPoint(); //隐藏怪物虚血 - EnemyManager.Instance.HideExpHP_Observer(); + //EnemyManager.Instance.HideExpHP_Observer(); } return; } @@ -555,7 +555,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag } //更新效果作用范围内怪物虚血 - EnemyManager.Instance.ShowExpHp_Observer(cardEntity.influencePreviewPool); + //EnemyManager.Instance.ShowExpHp_Observer(cardEntity.influencePreviewPool); } } @@ -635,7 +635,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag getNodeTools.setEffectRangePreviewTest(cardEntity.cardOriginalData, 90.0f, mapUnity, cardEntity); dyeing(); //更新效果作用范围内怪物虚血 - EnemyManager.Instance.ShowExpHp_Observer(cardEntity.influencePreviewPool); + //EnemyManager.Instance.ShowExpHp_Observer(cardEntity.influencePreviewPool); //更新涂色材质和地块数量统计预览 SettlementManager.Instance.PreviewColorMapUnity(cardEntity.cardOriginalData, GameManager .Instance .playerOn ); } @@ -706,36 +706,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag } } - private bool cardTargetCheck() - { - bool targetRight=false; - switch (cardEntity.cardOriginalData.CardTarget) - { - case Name.Target.enemy: - foreach (MapUnity mapUnity in cardEntity.influencePreviewPool) - { - if (mapUnity.enemyNode!=null&& mapUnity.enemyNode.enemyType==EnemyNode.EnemyType.enemy) - { - targetRight=true; break; - } - } - break; - case Name.Target.enemyAndBuilding: - foreach (MapUnity mapUnity in cardEntity.influencePreviewPool) - { - if (mapUnity.enemyNode != null ) - { - targetRight = true; break; - } - } - break; - case Name.Target.ally: - targetRight = true; - break; - } - Debug.Log("targetRight是"+ targetRight); - return targetRight; - } + } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs index 03965d12..dcdef26d 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs @@ -105,12 +105,6 @@ public class TurnMaster : Singleton //恢复体力 GameManager.Instance.playerState.currentStepRange = Usermanager.Instance.StepRangeCalculation(GameManager.Instance.playerState.maxStepRange); GameManager.Instance.isPlayerMoved = false; - //显示敌人攻击虚线 - EnemyManager.Instance.EnemyLine_Observer(); - //回复敌人系数 - EnemyManager.Instance.enemyMultiplierRestore(); - //决定敌人行动 - EnemyManager.Instance.EnemyAtionRandom(); //阶段流转 StartCoroutine(EndPlayerTurnBegin()); @@ -127,7 +121,7 @@ public class TurnMaster : Singleton //回合结束结算玩家buff Usermanager.Instance.PlayerTurnSettle(); //结算敌人护盾 - EnemyManager.Instance.enemyShieldSettle(0); + //EnemyManager.Instance.enemyShieldSettle(0); //消除移动预览 GameManager.Instance.player.CloseStepPreviewInfluencedNode(); //回合结束销毁卡牌 @@ -144,7 +138,7 @@ public class TurnMaster : Singleton //广播遗物接口 LegacyManager.Instance.BroadCastSettleInEnemyTurnBegin(); - EnemyManager.Instance.enemyTurnBeginSettle(0); + //EnemyManager.Instance.enemyTurnBeginSettle(0); turn = Turn.enemyTurn; } @@ -154,7 +148,7 @@ public class TurnMaster : Singleton //StartCoroutine(EnemyTurn()); //敌人动作如移动,涂色 - EnemyManager.Instance.EnemyTurn_Observer(); + //EnemyManager.Instance.EnemyTurn_Observer(); turn = Turn.turnStop; @@ -168,7 +162,7 @@ public class TurnMaster : Singleton //结算地块Buff MapUnitySettleManager.Instance.MapGridsEndSettle(); - EnemyManager.Instance.enemyTurnSettle(0); + //EnemyManager.Instance.enemyTurnSettle(0); turn = Turn.playerTurnBegin; @@ -224,7 +218,7 @@ public class TurnMaster : Singleton public void EndEnemyTurn() { - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.end; + //EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.end; turn = Turn.enemyTurnEnd; } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs deleted file mode 100644 index bf91c99d..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs +++ /dev/null @@ -1,180 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class AcidRainCloud : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.4f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.6f); - enemyNode.sufferAbnormalCondition(AbnormalCondition.acidRain, 1); - enemyNode.sufferAbnormalCondition(AbnormalCondition.vulnerable, 3); - } - - - private void OnEnable() - { - - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(PolluteAction()); - break; - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - } - - } - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShootAndPollute: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyActionAction_Attack: - canMove = false; - canAttack = true; - canAoe=false; - break; - } - } - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShootAndPollute: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(5, 0.2f); - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - } - } - - - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_ShootAndPollute: - //改变文本 - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(), "对全场造成" + enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString() + "点伤害,随机污染6格地块"); - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(), "造成"+ enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString() + "点伤害,使玩家手牌中随机一张牌变为消耗"); - break; - } - - } - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet=new HashSet { GameManager.Instance.playerOn }; - getNodeTools.getCircleNodeForEnemy(targetSet, 1); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.nextDrawCardisDisposable, 1); - //RandomTurnHandCardTempIsDisposable(1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.nextDrawCardisDisposable, 1); - //RandomTurnHandCardTempIsDisposable(1); - } - } - } - } - - public void RandomTurnHandCardTempIsDisposable(int num) - { - HashSet < CardEntity > targetSet= MathTool.GetRandomElements(new HashSet(TurnMaster.Instance.handCard.cardEntityList), num); - foreach(CardEntity cardEntity in targetSet) - { - cardEntity.tempIsDisposable = true; - } - } - public IEnumerator ThrowAttackAction(int count) - { - int range = 2; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (currentNode.whoColour == Name.NodeColor.Black) - { - range = 3; - } - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - //yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AoeDamage(getNodeTools.getNodesCount(Name.Color.Black), count, GameManager.Instance.playerOn, range); - } - yield return null; - } - - - public IEnumerator PolluteAction() - { - AttackDamage(enemyNode.currentActionScript.colA, 1); - RandomPollute(getNodeTools.getAllNotBlackNodes(), 6); - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs.meta deleted file mode 100644 index a252ff9b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/AcidRainCloud.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0d79ad6169a7e3249929c9b64a492eec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs deleted file mode 100644 index 89d21b07..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class BoundSoul : Enemy -{ - - - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.parasitism, 1); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_BoundSoul, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 1.0f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if(GameManager.Instance!=null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - - } - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - } - } - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - enemyNode.currentActionScript.colB = 2; - break; - } - } - - private void Update() - { - if (enemyNode!=null&&enemyNode.currentActionScript != null) - { - if (MapUnityManager.Instance.enemyNodeCount > 15) - { - enemyNode.currentActionScript.colB=3; - } - else - { - enemyNode.currentActionScript.colB =2; - } - enemyNode.enemy.SettlePlannText(enemyNode.enemy.enemyAction); - } - - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Attack: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode,attackText+"*"+ enemyNode.currentActionScript.colB.ToString(), "造成"+attackText +"点伤害"+ enemyNode.currentActionScript.colB+"次并至多移动" +stepRangeText +"个格子"); - break; - - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - } - } - - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - int damageCount = 2; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - if (MapUnityManager.Instance.enemyNodeCount>15) - { - damageCount++; - } - AttackDamage(enemyNode.currentActionScript.colA, enemyNode.currentActionScript.colB); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - if (MapUnityManager.Instance.enemyNodeCount > 15) - { - damageCount++; - } - AttackDamage(enemyNode.EnemyState.damage, damageCount); - } - } - } - } - -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs.meta deleted file mode 100644 index 1d70e6ed..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BoundSoul.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d259254ccfef91d4087ce9c39e136cd0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs deleted file mode 100644 index 992c1e1f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.UIElements; - -public class Climavista : Enemy -{ - - - - private void Start() - { - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shield), 0.7f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.summon), 0.3f); - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.halfDamageInBlack, 1); - } - - private void OnEnable() - { - - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Shield: - yield return StartCoroutine(ShieldAction()); - break; - case EnemyAction_Summon: - yield return StartCoroutine(SummonAction()); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Shield: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyAction_Summon: - canMove = false; - canAttack = false; - canAoe = false; - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Shield: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(15, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Shield: - //改变文本 - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "对生命值最低的一个单位施加" + enemyNode.currentActionScript.colA.ToString() + "点护盾"); - break; - case EnemyAction_Summon: - enemyNode.currentActionScript.SettleText(enemyNode, "", "复制一个当前状态的酸雨云"); - break; - } - - } - - public override IEnumerator ShieldAction() - { - int minHp = 100; - int index = 0; - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if ((int)EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.currentHP < minHp) - { - minHp = (int)EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.currentHP; - index = i; - } - } - EnemyManager.Instance.enemySpeedSortingList[index].EnemyState.shieldValue += EnemyManager.Instance.enemySpeedSortingList[index].ShieldCalculation(enemyNode.currentActionScript.colA); - yield return new WaitForSeconds(0.5f); - } - - public void RandomTurnHandCardTempIsDisposable(int num) - { - HashSet < CardEntity > targetSet= MathTool.GetRandomElements(new HashSet(TurnMaster.Instance.handCard.cardEntityList), num); - foreach(CardEntity cardEntity in targetSet) - { - cardEntity.tempIsDisposable = true; - } - } - public IEnumerator SummonAction() - { - GameObject target= null; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet set = new HashSet { GameManager.Instance.playerOn }; - getNodeTools.getCircleNode(set, 1); - HashSet targetSet = MathTool.GetRandomElements(set,1); - MapUnity enemyMapunity=targetSet.ElementAt(0); - EnemyNode targetEnemy=new EnemyNode(); - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if (EnemyManager.Instance.enemySpeedSortingList[i].enemyScript==EnemyNode.EnemyScript.AcidRainCloud) - { - target = EnemyManager.Instance.enemySpeedSortingList[i].GetComponent(); - targetEnemy=EnemyManager.Instance.enemySpeedSortingList[i]; - } - } - if (target == null||enemyMapunity==null) - { - yield return null; - } - List enemyPrefabList = EnemyPool.getEnemyPrefab(new List { Name.EnemyName.AcidRainCloud }); - HashSet allCanUseNode = getNodeTools.getAllCanUseNode(); - if (enemyPrefabList.Count > 0) - { - foreach (var enemyPrefab in enemyPrefabList) - { - MapUnity currentMapUnity = allCanUseNode.ElementAt(UnityEngine.Random.Range(0, allCanUseNode.Count)); - var currentEnemy = Instantiate(enemyPrefab, currentMapUnity.transform.position, enemyPrefab.transform.rotation); - EnemyNode enemynode = currentEnemy.GetComponent(); - enemynode.positionX = currentMapUnity.locationX; - enemynode.positionY = currentMapUnity.locationY; - enemynode.StartPosition(); - enemynode.EnemyState.copy(targetEnemy.EnemyState); - //enemynode.EnemyState == targetEnemy.EnemyState; - allCanUseNode.Remove(currentMapUnity); - yield return new WaitForSeconds(0.5f); - } - } - /*var currentenemy = Instantiate(target, this.transform.position, this.transform.rotation); - EnemyNode newEnemyNode = currentenemy.GetComponent(); - newEnemyNode.positionX = enemyMapunity.locationX; - newEnemyNode.positionY = enemyMapunity.locationY; - MapUnity newNode = getNodeTools.LocationToGetNode(newEnemyNode.positionX, newEnemyNode.positionY); - newNode.enemyNode = newEnemyNode;*/ - yield return new WaitForSeconds(0.5f); - } - - - public IEnumerator PolluteAction() - { - AttackDamage(5,1); - RandomPollute(getNodeTools.getAllNotBlackNodes(), 6); - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs.meta deleted file mode 100644 index 85d9a197..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Climavista.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b46e9eb3a752a3e4eb4c052abe78f82a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs deleted file mode 100644 index 917cb95b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class ContaminatusImmortalis : Enemy -{ - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_ContaminatusImmortalis, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.7f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.3f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - case EnemyAction_ShootAndPollute: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(9, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Attack: - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText+ "*4", "造成" + attackText + "*4点伤害"); - break; - case EnemyAction_ShootAndPollute: - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "对场地随机14格地面造成"+ enemyNode.currentActionScript.colA+"点伤害,污染地面"); - break; - - } - - } - - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction(4)); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(PolluteAction()); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_ShootAndPollute: - canMove = false; - canAttack = false; - canAoe = true; - break; - } - } - - public override void GetAimTarget() - { - if (targets != null) - { - targets.Clear(); - } - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShootAndPollute: - targets = MathTool.GetRandomElements(getNodeTools.getAllNotBlackNodes(), 14); - break; - } - } - - public IEnumerator PolluteAction() - { - //HashSet targets = MathTool.GetRandomElements(getNodeTools.getAllNotBlackNodes(), 14); - PolluteAndDamageNodes(targets,Name.NodeColor.Black, enemyNode.currentActionScript.colA, 1); - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs.meta deleted file mode 100644 index d916eaee..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ContaminatusImmortalis.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d8dda45e065f05d4184f7dc5a89f69ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs deleted file mode 100644 index 680f8e5a..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs +++ /dev/null @@ -1,559 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Unity.VisualScripting; -using UnityEngine; -using static TurnMaster; - -public class Enemy : MonoBehaviour -{ - public EnemyNode enemyNode; - - public bool canMove=false; - - public bool canAttack=false; - - public bool canAoe = false; - - //怪物行动 - public EnemyAction enemyAction; - - //瞄准目标 - public MapUnity aimNode; - - public Dictionary actionPool = new Dictionary(); - - public ZeroToFiveCircularCounter counter = new ZeroToFiveCircularCounter(); - - public HashSet targets = new HashSet(); - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - // [Header("计数标量")] - // public float time; - // float lastTime = 0; - [Header("移动速度标量")] - float moveSpeed =5f; - - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - public virtual void ChooseAction() - { - enemyAction = new EnemyAction_Nothing(); - Debug.Log("actionPool大小" + actionPool.Count()+this .name ); - if (enemyNode == null) - { - Debug.Log("enemyNode大小"); - } - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - ActionValRandom(); - BoolCheck(); - GetAimTarget(); - enemyNode.enemy.SettlePlannText(enemyNode.enemy.enemyAction); - enemyNode.enemy.SettleRangeAttack(); - } - - public void Update() - { - if (enemyNode != null && enemyNode.currentActionScript != null) - { - enemyNode.enemy.SettlePlannText(enemyNode.enemy.enemyAction); - } - } - - public virtual void ActionValRandom() - { - - } - - public virtual void BoolCheck() - { - - } - - public virtual void GetAimTarget() - { - - } - public virtual void SettlePlannText(EnemyAction currentAction) - { - - } - public virtual void SettleRangeAttack() - { - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - } - public virtual void ChooseAimNode() - { - aimNode = GameManager.Instance.playerOn; - } - - public void AttackDamage(int damage,int count) - { - for (int i = 0; i < count; i++) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } - - } - - public int stealForgingPoint(int num) - { - int result = 0; - int playCount = GameManager.Instance.playerState.forgingPoint; - if (playCount>=num) - { - result = num; - GameManager.Instance.playerState.forgingPoint -= num; - } - else - { - result = playCount; - GameManager.Instance.playerState.forgingPoint = 0; - } - PlayerStatsManager.Instance.BroadCastSyncText();//同步UI - return result; - } - - public int stealMoney(int num) - { - int result = 0; - int playCount = GameManager.Instance.playerState.money; - if (playCount >= num) - { - result = num; - GameManager.Instance.playerState.money -= num; - } - else - { - result = playCount; - GameManager.Instance.playerState.money = 0; - } - PlayerStatsManager.Instance.BroadCastSyncText();//同步UI - return result; - } - - public void PolluteNodes(HashSet targetSet,int color) - { - foreach (MapUnity target in targetSet) - { - target.switchColorForEnemy(color); - } - - } - - public void PolluteAndDamageNodes(HashSet targetSet, int color,int damage,int damageCount) - { - foreach (MapUnity target in targetSet) - { - target.switchColorForEnemy(color); - if (GameManager.Instance.playerOn.Equals(target)) - { - AttackDamage(damage, damageCount); - } - } - - } - - public void AoeDamage(int damage, int count,MapUnity targetNode,int range) - { - HashSet targetSet = new HashSet(); - targetSet.Add(targetNode); - getNodeTools.getCircleNodeForBoom(targetSet, range); - if (targetSet.Contains(GameManager.Instance.playerOn)) - { - for (int i = 0; i < count; i++) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } - } - - - } - - public virtual IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - } - } - } - } - - public virtual IEnumerator MeleeAttackAction(int damageCount) - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, damageCount); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, damageCount); - } - } - } - } - - public virtual IEnumerator ThrowAttackAction(int range,int damage,int count,MapUnity target) - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - //yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AoeDamage(damage, count, target, range); - } - yield return null; - } - public IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - public IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - public int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - public IEnumerator moveOneStep(MapUnity nexMapUnity) - { - //enemyNode.bleedCal(); - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - // transform.SetParent(disNode.CylinderFloor.transform); - - yield return StartCoroutine(MoveCoroutine(disNode)); - } - - public IEnumerator MoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - Vector3 startPos = transform.position; - Vector3 endpos = new Vector3(endMapUnity.transform.position.x, transform.position.y, endMapUnity.transform.position.z); - //直线运动 - /*float time = 0; - bool move = true; - while (move) - { - transform.position = Vector3.Lerp(startPos, endpos, time += Time.deltaTime * moveSpeed); - - if (time >= 1) - { - move = false; - } - yield return null; - }*/ - //曲线跳跃 - Vector3 jumpCentre = new Vector3((startPos.x + endpos.x) / 2.0f, (startPos.y + endpos.y) / 2.0f + enemyNode.jumpHeight, (startPos.z + endpos.z) / 2.0f); - List linePath = new List(); - linePath = enemyNode.CalculatePath(linePath, enemyNode.posCount, startPos, jumpCentre, endpos); - bool move = true; - float time = 0; - Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); - - for (int posIndex = 0; posIndex < linePath.Count; posIndex++) - { - time = 0; - move = true; - while (move) - { - if (posIndex == linePath.Count - 1) - { - transform.position = Vector3.Lerp(linePath[posIndex], endpos, time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); - } - else - { - transform.position = Vector3.Lerp(linePath[posIndex], linePath[posIndex + 1], time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); //time += Time.deltaTime * speedCurve.Evaluate(posIndex+1 /posCount )); - } - - if (time >= 1) - { - move = false; - } - yield return null; - } - - } - // transform.localPosition = new Vector3(0, 0, -0.1468f); - //声音 - AudioManager.Instance.EnemyMoveVoicePlayer(); - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - public IEnumerator MeleeAttackAndPolluteAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage, 1); - GameManager.Instance.playerOn.switchColorForEnemy(Name.NodeColor.Black); - int offset = getNodeTools.getEnemyToPlayerUnitPoolOffset(GameManager.Instance.playerOn, currentNode); - if (GameManager.Instance.playerOn.unitPool[counter.Add(2, offset)] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[counter.Add(2, offset)]; - mapUnityA.switchColorForEnemy(Name.NodeColor.Black); - } - if (GameManager.Instance.playerOn.unitPool[counter.Add(3, offset)] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[counter.Add(3, offset)]; - mapUnityA.switchColorForEnemy(Name.NodeColor.Black); - } - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage, 1); - GameManager.Instance.playerOn.switchColorForEnemy(Name.NodeColor.Black); - int offset = getNodeTools.getEnemyToPlayerUnitPoolOffset(GameManager.Instance.playerOn, currentNode); - if (GameManager.Instance.playerOn.unitPool[counter.Add(2, offset)] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[counter.Add(2, offset)]; - mapUnityA.switchColorForEnemy(Name.NodeColor.Black); - } - if (GameManager.Instance.playerOn.unitPool[counter.Add(3, offset)] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[counter.Add(3, offset)]; - mapUnityA.switchColorForEnemy(Name.NodeColor.Black); - } - } - } - } - } - - public void RandomPollute(HashSet set, int num) - { - HashSet randomNodes = MathTool.GetRandomElements(set, num); - foreach (var node in randomNodes) - { - node.switchColorForEnemy(Name.NodeColor.Black); - } - GameManager.Instance.SyncColourCountUI(); - } - - public void ClearNodes(HashSet set) - { - foreach (MapUnity node in set) - { - if (Name.NodeColor.PlayerColor.Contains(node.whoColour)) - { - node.switchColorForEnemy(Name.NodeColor.White); - } - - } - GameManager.Instance.SyncColourCountUI(); - } - - public int ClearNodesReturnCount(HashSet set) - { - int result = 0; - foreach (MapUnity node in set) - { - if(node.whoColour!= Name.NodeColor.White) - { - node.switchColorForEnemy(Name.NodeColor.White); - result++; - } - - } - GameManager.Instance.SyncColourCountUI(); - return result; - } - - public virtual void OnDeath() - { - - } - public void RecoverHp(int val) - { - float recoverHp = val + enemyNode.EnemyState.currentHP; - float trueHp = Math.Min(recoverHp, enemyNode.EnemyState.maxHP); - enemyNode.EnemyState.currentHP = trueHp; - } - - public virtual void enemyTurnEnd() - { - - } - - public virtual void enemyTurnBegin() - { - - } - public virtual IEnumerator ShieldAction() - { - enemyNode.EnemyState.shieldValue += 4; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage,1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage, 1); - } - } - } - } - - public virtual IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public virtual IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_AttackAndShield: - yield return StartCoroutine(ShieldAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(MeleeAttackAndPolluteAction()); - break; - } - - - - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs.meta deleted file mode 100644 index 48b7e8e1..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Enemy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ba002dfb2b8a52045816a7b9c1740657 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs deleted file mode 100644 index 5dc7d938..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs +++ /dev/null @@ -1,640 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyManager : Singleton -{ - [SerializeField] - public List enemyObservers = new List(); - - [Header("悬停角色属性")]//uibar - public GameObject statePanel; - public Text hPText; - public Text attackText; - public Text stepRangeText; - public Text attackRangeText; - public Text speedText; - public Text nameText; - public Image enemyIcon; - - // [Header("悬停角色意图")]//planAction - // public GameObject planPanle; - // public Text stateText; - - [Header("怪物顺序控件")] - public List enemySpeedSortingList;//安照速度进行排序 - public int enemyCount;//记录几只怪进行了行动 - public EnemyTurnState enemyTurnState; - - [Header("怪物顺序UI控件")] - public List enemySortIconList = new List();//怪物排序UI图标 - public GameObject enemySortIconPrefab;//icon预制体 - public GameObject enemySortIconPanle;//排序父级面板 - - [Header("怪物局内UI条")] - public GameObject enemyUIBar; - public GameObject blockUIBar; - public enum EnemyTurnState - { - stop, - runing, - end - } - - - public void SpeedSortList() - { - enemySpeedSortingList.Clear(); - foreach (var observer in enemyObservers) - { - EnemyNode enemyNode = observer.GetEnemyNode(); - if(enemyNode .enemyType ==EnemyNode.EnemyType.enemy ) - { - enemySpeedSortingList.Add(enemyNode); - } - } - - enemySpeedSortingList.Sort(SpeedSort); - } - private int SpeedSort(EnemyNode a, EnemyNode b) - { - if (a.EnemyState.speed > b.EnemyState.speed) - return -1; - else - return 1; - } - - public bool isEnemyAlive(string enemyName) - { - bool isAlive = false; - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if (EnemyManager.Instance.enemySpeedSortingList[i].enemyScript==EnemyNode.EnemyScript.SoulMaker) - { - isAlive=true; - return isAlive; - } - } - return isAlive; - } - public void GetEnemyPosition_Observer() - { - foreach (var observer in enemyObservers ) - { - observer.GetEnemyPosition(); - } - } - public void EnemyColour_Observer() - { - foreach (var observer in enemyObservers) - { - observer.EnemyColour(); - } - } - - public void ShowExpHp_Observer(HashSet mapUnities) - { - foreach (var observer in enemyObservers) - { - observer.ShowExpHp(mapUnities); - } - } - public void HideExpHP_Observer() - { - foreach (var observer in enemyObservers) - { - observer.HideExpHP(); - } - } - - public void EnemyTurn_Observer() - { - //SpeedSortList(); - enemyCount = 0; - enemyTurnState = EnemyTurnState.stop; - EnemySortIconDelete(); - EnemySortIconGnerate(); - StartCoroutine(EnemyTurn()); - } - - IEnumerator EnemyTurn() - { - List enemySpeedSortingListCopy = new List(enemySpeedSortingList); - foreach (var observer in enemySpeedSortingListCopy) - { - EnemySortIconSync(); - enemyTurnState = EnemyTurnState.stop; - observer.EnemyTurn(); - - - enemyCount += 1; - - yield return new WaitUntil(()=>enemyTurnState==EnemyTurnState.runing); - PlayerStatsManager.Instance.EffectFunction(6, "下一个"); - yield return new WaitForSeconds(1f); - Debug.Log("enemyCount是"+enemyCount); - if (enemyCount >= enemySpeedSortingListCopy.Count) - { - TurnMaster.Instance.EndEnemyTurn(); - } - } - } - public void EnemySortIconGnerate() - { - // enemySortIconPanle.GetComponent().sizeDelta = new Vector2(enemySpeedSortingList.Count * 100 + 50, 100); - - for (int i = 0; i < enemySpeedSortingList.Count; i++) - { - var enemySortIcon = Instantiate(enemySortIconPrefab, enemySortIconPanle.transform ); - enemySortIcon.GetComponent().sprite = enemySpeedSortingList[i].EnemyState.enemyIcon; - - enemySortIconList.Add(enemySortIcon); - } - } - public void EnemySortIconSync() - { - if (enemyCount >= 1) - { - enemySortIconList[enemyCount-1].transform.localScale = new Vector3(1f, 1f, 1f); - enemySortIconList[enemyCount-1].transform.GetChild(0).gameObject.SetActive(false); - } - - enemySortIconList[enemyCount].transform.localScale = new Vector3(1.2f, 1.2f, 1.2f); - enemySortIconList[enemyCount].transform.GetChild(0).gameObject.SetActive(true); - } - public void EnemySortIconDelete() - { - - for (int i = 0; i < enemySortIconList.Count; i++) - { - Destroy(enemySortIconList[i]); - } - enemySortIconList.Clear(); - } - - public void EnemyAtionRandom() - { - foreach (var observer in enemySpeedSortingList) - { - observer.DetermineIntent(); - } - } - public void EnemySkillCoolDown_Observer() - { - foreach (var observer in enemyObservers) - { - observer.SettlementSkill(); - } - } - public void EnemyLine_Observer() - { - foreach (var observer in enemyObservers) - { - if(observer .GetEnemyNode ().enemyType ==EnemyNode.EnemyType.enemy ) - observer.AppearAimLine(); - } - } - - public void enemyRefreshEnemyBuffIcon(int settleTurn) - { - foreach (var observer in enemyObservers) - { - //observer.GetEnemyNode().enemyTurnSettleInit(); - observer.GetEnemyNode().enemyRefreshUIIcon(settleTurn); - } - } - - public void enemyTurnSettle(int settleTurn) - { - foreach (var observer in enemyObservers) - { - //observer.GetEnemyNode().enemyTurnSettleInit(); - observer.GetEnemyNode().enemyTurnSettle(settleTurn); - } - } - - public void enemyShieldSettle(int settleTurn) - { - foreach (var observer in enemyObservers) - { - observer.GetEnemyNode().enemyShieldSettle(settleTurn); - } - } - - public void enemyTurnBeginSettle(int settleTurn) - { - SpeedSortList(); - foreach (var observer in enemyObservers) - { - //observer.GetEnemyNode().enemyTurnSettleInit(); - observer.GetEnemyNode().enemyTurnBeginSettle(settleTurn); - } - } - - public void enemyMultiplierRestore() - { - foreach (var observer in enemyObservers) - { - observer.GetEnemyNode().enemyTurnSettleInit(); - } - } - - public void AttackRangeInfluencedNode(MapUnity enemyNode, int step, List influencePreviewPool)//计算攻击范围 - { - influencePreviewPool.Clear(); - - //GameManager.Instance.playerOn.InfluencePool = GameManager.Instance.playerOn.unitPool; - MapUnity playerNode = enemyNode; - MapUnity currentNode = enemyNode; - MapUnity xRememberNode = enemyNode; - //Vector2 currentPoint = new Vector2(currentNode.locationX, currentNode.locationY); - //Vector2 surchPoint = new Vector2(currentNode.locationX, currentNode.locationY-step); - - //迭代六次-逆时针 - //向左 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[0] != null) - { - xRememberNode = xRememberNode.unitPool[0];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[5] != null) - { - influencePreviewPool.Add(currentNode.unitPool[5]); - currentNode = currentNode.unitPool[5]; - } - else break; - - } - } - //向左下 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[5] != null) - { - xRememberNode = xRememberNode.unitPool[5];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[4] != null) - { - influencePreviewPool.Add(currentNode.unitPool[4]); - currentNode = currentNode.unitPool[4]; - } - else break; - - } - } - //向右 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[4] != null) - { - xRememberNode = xRememberNode.unitPool[4];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[3] != null) - { - influencePreviewPool.Add(currentNode.unitPool[3]); - currentNode = currentNode.unitPool[3]; - } - else break; - - } - } - //向右上 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[3] != null) - { - xRememberNode = xRememberNode.unitPool[3];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[2] != null) - { - influencePreviewPool.Add(currentNode.unitPool[2]); - currentNode = currentNode.unitPool[2]; - } - else break; - - } - } - //向上 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[2] != null) - { - xRememberNode = xRememberNode.unitPool[2];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[1] != null) - { - influencePreviewPool.Add(currentNode.unitPool[1]); - currentNode = currentNode.unitPool[1]; - } - else break; - - } - } - //向左上 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[1] != null) - { - xRememberNode = xRememberNode.unitPool[1];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[0] != null) - { - influencePreviewPool.Add(currentNode.unitPool[0]); - currentNode = currentNode.unitPool[0]; - } - else break; - - } - } - - //迭代六次-顺时针 - //向左 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[5] != null) - { - xRememberNode = xRememberNode.unitPool[5];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[0] != null) - { - if (currentNode.effectInfluenced == false) - { - influencePreviewPool.Add(currentNode.unitPool[0]); - currentNode = currentNode.unitPool[0]; - } - } - else break; - - } - } - //向左下 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[4] != null) - { - xRememberNode = xRememberNode.unitPool[4];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[5] != null) - { - if (currentNode.effectInfluenced == false) - { - influencePreviewPool.Add(currentNode.unitPool[5]); - currentNode = currentNode.unitPool[5]; - } - } - else break; - - } - } - //向右 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[3] != null) - { - xRememberNode = xRememberNode.unitPool[3];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[4] != null) - { - if (currentNode.effectInfluenced == false) - { - influencePreviewPool.Add(currentNode.unitPool[4]); - currentNode = currentNode.unitPool[4]; - } - } - else break; - - } - } - //向右上 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[2] != null) - { - xRememberNode = xRememberNode.unitPool[2];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[3] != null) - { - if (currentNode.effectInfluenced == false) - { - influencePreviewPool.Add(currentNode.unitPool[3]); - currentNode = currentNode.unitPool[3]; - } - } - else break; - - } - } - //向上 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[1] != null) - { - xRememberNode = xRememberNode.unitPool[1];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[2] != null) - { - if (currentNode.effectInfluenced == false) - { - influencePreviewPool.Add(currentNode.unitPool[2]); - currentNode = currentNode.unitPool[2]; - } - } - else break; - - } - } - //向左上 - xRememberNode = playerNode;//记忆标量归位 - for (int j = 0; j < step; j++) - { - // surchPoint.y = currentNode.locationY+j+1; - // surchPoint.x = currentNode.locationX; - if (j != 0) - { - if (xRememberNode.unitPool[0] != null) - { - xRememberNode = xRememberNode.unitPool[0];//延迟一步 - } - else break; - } - - currentNode = xRememberNode; - - for (int k = 0; k < step - j; k++) - { - if (currentNode.unitPool[1] != null) - { - if (currentNode.effectInfluenced == false) - { - influencePreviewPool.Add(currentNode.unitPool[1]); - currentNode = currentNode.unitPool[1]; - } - } - else break; - - } - } - - List disInfluencePreviewPool = influencePreviewPool.Distinct(new MapUnityCompare()).ToList (); - influencePreviewPool.Clear(); - foreach (var i in disInfluencePreviewPool ) - { - influencePreviewPool.Add(i); - } - - } - - - //比较类 - class MapUnityCompare : IEqualityComparer - { - public bool Equals(MapUnity x, MapUnity y) - { - if((x.locationX == y.locationX)&&(x.locationY == y.locationY)) - { - return true; - } - return false; - } - - public int GetHashCode(MapUnity obj) - { - return obj.locationX.GetHashCode() ^ obj.locationY.GetHashCode(); - } - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs.meta deleted file mode 100644 index d7fc4ffb..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8793b4e36c078945a2ad3a3dc66cb30 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 30 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs deleted file mode 100644 index 2a654c54..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs +++ /dev/null @@ -1,2039 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using static UnityEngine.EventSystems.EventTrigger; - -public class EnemyNode : MonoBehaviour,IEnemyObserver -{ - public EnemyState_SO templateEnemyState; - public EnemyState_SO EnemyState; - - public int positionX,positionY;//初始位置,移动后位置写回 - [Header("寻路控件")] - public List pasth = new List();//路径 - public List oppositePasth = new List();//逃跑路径 - public MoveType moveType = MoveType.front; - - public Enemy enemy=new Enemy(); - public enum MoveType - { - front, - stay, - back - } - [Header("寻范围预览池")] - public List rangePool = new List();//范围预览 - - public HashSet moveRangePool = new HashSet();//移动范围预览 - public HashSet attackRangePool = new HashSet();//攻击范围预览 - public List aoeRangePool = new List();//范围预览 - - public string stateText=new string(""); - - [Header("走路参数")] - public float jumpHeight; - public float posCount; - public float jumpSpeed; - public AnimationCurve speedCurve; - - [Header("敌人类型")] - public EnemyType enemyType; - public EnemyScript enemyScript; - - [Header("瞄准虚线")] - public GameObject lineAim; - public bool canLineAppre; - - public GameObject disableAttack;//不能攻击图标 - - [Header("敌人UI控制器")] - public EnemyUIBar enemyUIBar; - public BlockUIBar blockUIBar; - public GameObject enemyUI;//UI跟随 - public Transform followPoint;//跟随点 - public Vector3 followPointPostion = new Vector3 (0,0.2f,-0.35f); - - [Header("当前意图脚本")] - public EnemyAction currentActionScript; - - public GameObject bone; - - public GameObject bone_Re; - [Header("敌人状态变化")] - public int lasteHp; - [Header("敌人状态机")] - public Animator anim; - [Header("敌人近战攻击动画速度")] - public float meleeAttackSpeed; - public AnimationCurve meleeAttackSpeedCurve; - [Header("死亡特效")] - public GameObject deathVfx; - public GameObject deathParticle; - public GameObject deathParticle_2; - public enum EnemyType - { - enemy, - block - } - - public enum EnemyScript//enemyType.enemy下的细分种类,选择这个敌人使用了哪个逻辑的脚本 - { - none,//标识是不能进行自律逻辑的单位,如可攻击的地块 - blackSheep, - FailedSample, - BoundSoul, - LivingArmor, - RatWarrior, - SoulMaker, - Pharmacist, - Twinbee, - ReconnaissanceBee, - PrismReflector, - PollutionSpreader, - Gravitus, - Thief, - Pollutinel, - ContaminatusImmortalis, - Leviathan, - StonePillar, - AcidRainCloud, - Climavista - - } - [Header("意图行动")] - public bool canMove; //可以移动 - public PlanAction planAction; - public enum PlanAction - { - attack, - dashAttack, - shoot, - sheield, - upBuff, - deBuff, - aoe, - random - } - - public virtual void LoadRange() - { - MapUnity currentMapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - int attackRange=EnemyState.attackRange; - int stepRange = getStepRange(); - if (moveRangePool!=null) - { - moveRangePool.Clear(); - } - if (attackRangePool != null) - { - attackRangePool.Clear(); - } - HashSet stepNodeSet=new HashSet { currentMapUnity }; - HashSet currentNodeSet = new HashSet { currentMapUnity }; - HashSet attackNodeSet = new HashSet { currentMapUnity }; - getNodeTools.getCircleNode(stepNodeSet, stepRange); - if (enemy.canMove) - { - for (int i = stepRange+1; i < stepRange + attackRange+1; i++) - { - HashSet newSet = new HashSet { currentMapUnity }; - getNodeTools.getArcNodeForEnemyAttack(newSet, i); - attackRangePool.UnionWith(newSet); - } - Debug.Log("attackRangePool大小是" + attackRangePool.Count); - } - else - { - - HashSet newSet = new HashSet { currentMapUnity }; - getNodeTools.getCircleNode(newSet, attackRange); - attackRangePool.UnionWith(newSet); - } - - moveRangePool.UnionWith(stepNodeSet); - } - - public virtual void ShowRange() - { - //遍历影响池变色 - switch (enemy.canMove) - { - case true: - ShowStepPoolRange(moveRangePool); - if (enemy.canAttack) - { - ShowAttackPoolRange(attackRangePool); - } - if (enemy.canAoe) - { - ShowAttackPoolRange(enemy.targets); - } - break; - case false: - if (enemy.canAttack) - { - ShowAttackPoolRange(attackRangePool); - } - if (enemy.canAoe) - { - ShowAttackPoolRange(enemy.targets); - } - break; - } - - } - - public virtual void ShowAttackPoolRange(HashSet rangePool) - { - //遍历影响池变色 - if (rangePool != null) - { - HashSet hashPool = rangePool.ToHashSet(); - foreach (var mapNode in rangePool) - { - mapNode.EnemyInfluenced(hashPool); - mapNode.enemyInfMark.GetComponent().material = mapNode.enemyAttackRangeMark; - } - } - - } - - public virtual void ShowStepPoolRange(HashSet rangePool) - { - //遍历影响池变色 - if (rangePool != null) - { - HashSet hashPool = rangePool.ToHashSet(); - foreach (var mapNode in rangePool) - { - mapNode.EnemyInfluenced(hashPool); - mapNode.enemyInfMark.GetComponent().material = mapNode.enemyMoveRangeMark; - } - } - - } - private void OnEnable() - { - EnemyManager.Instance.enemyObservers.Add(this); - if (enemyType==EnemyType.enemy) - { - EnemyManager.Instance.enemySpeedSortingList.Add(this); - } - - if (templateEnemyState != null) - EnemyState = Instantiate(templateEnemyState); - - if (enemyType == EnemyType.enemy) - enemyUIBar = GetComponent(); - - if (enemyUIBar == null) - { - CreatEnemyUIBar(this); - } - - } - private void OnDisable() - { - if (EnemyManager.Instance!= null ) - { - EnemyManager.Instance.enemyObservers.Remove(this); - if (enemyType == EnemyType.enemy) - { - EnemyManager.Instance.enemySpeedSortingList.Remove(this); - } - } - } - private void Start() - { - if(enemyUIBar ==null ) - { - CreatEnemyUIBar(this); - } - lasteHp = (int)EnemyState.currentHP; - - } - - private void Update() - { - if(disableAttack != null&& enemyType == EnemyType.enemy) - { - if (attackRangePool!=null&&attackRangePool.Contains(GameManager.Instance.playerOn)) - { - disableAttack.SetActive(false); - - } - else - { - disableAttack.SetActive(true); - } - if (aoeRangePool.Count > 0) - { - if (aoeRangePool.Contains(GameManager.Instance.playerOn)) - { - disableAttack.SetActive(false); - - } - else - { - disableAttack.SetActive(true); - } - } - } - - //减血音效 - if(EnemyState .currentHP < lasteHp ) - { - StartCoroutine(EnemyHurtVoice(0.9f)); - lasteHp = (int)EnemyState.currentHP; - - if(enemyType == EnemyType.block ) - { - EnemyState.currentNumberOfHits -= 1; - blockUIBar.SyncHp(EnemyState.currentNumberOfHits); - /* if(EnemyState.currentNumberOfHits <= 0 ) - { - // GameManager.Instance.X[positionX].Y[positionY].blocked = false; - OnDeath(); - }*/ - } - } - - - } - //展示虚血(预计伤害) - public void ShowExpHp(HashSet mapUnities ) - { - if(enemyType == EnemyType.enemy ) - { - if (EnemyState.shieldValue > 0 && Usermanager.Instance.expectDamage.Item1 > 0) - { - enemyUIBar.sheildFlash.enabled = true; - } - if (mapUnities.Contains(getNodeTools .LocationToGetNode (positionX ,positionY))) - { - enemyUIBar.isSync = false; - float remainDamage = EnemyState.shieldValue - ExpectSufferDamageCal(Usermanager.Instance.expectDamage, getNodeTools.LocationToGetNode(positionX, positionY)); - Debug.Log("remainDamage是"+ remainDamage); - if (remainDamage >= 0) - { - enemyUIBar.sheildText.text = remainDamage.ToString(); - } - else - { - enemyUIBar.sheildText.text = "0"; - enemyUIBar.expHPBar.gameObject.SetActive(true); - int val = (int)(EnemyState.currentHP + remainDamage); - MathTool.keepNature(ref val); - enemyUIBar.currentHPText.text = val.ToString(); - enemyUIBar.expHPBar.fillAmount = EnemyState.currentHP / EnemyState.maxHP; - enemyUIBar.expAfterHPBar.fillAmount = (EnemyState.currentHP + remainDamage) / EnemyState.maxHP; - } - - } - else - { - HideExpHP(); - } - } - - } - //关闭虚血展示 - public void HideExpHP() - { - if (enemyType == EnemyType.enemy) - { - enemyUIBar.expHPBar.gameObject.SetActive(false); - enemyUIBar.isSync = true; - enemyUIBar.sheildFlash.enabled = false; - enemyUIBar.sheildFlash.image.color = enemyUIBar.sheildFlash.originColor; - } - - } - IEnumerator EnemyHurtVoice(float time) - { - yield return new WaitForSeconds(time); - AudioManager.Instance.EnemyHurtVoicePlayer(); - } - public virtual void CreatEnemyUIBar(EnemyNode enemyNode ) - { - followPoint.localPosition = followPointPostion; - enemyUI = Instantiate(EnemyManager.Instance.enemyUIBar,enemyNode. followPoint.position,followPoint.rotation); - enemyUI.transform.SetParent(enemyNode . transform); - enemyUIBar = enemyUI.GetComponent(); - enemyUIBar.enemyNode = enemyNode; - } - - - public void StartPosition() - { - //this.transform.position = GameManager.Instance.X[positionX].Y[positionY].transform.position; - MapUnity mapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - mapUnity.enemyNode = this; - EnemyState.currentHP = 1; - // transform.SetParent(mapUnity.CylinderFloor.transform); - if (enemyType ==EnemyType.block) - { - mapUnity.blocked = true; - } - } - - public void DetermineIntent() - { - switch (enemyScript) - { - case EnemyScript.blackSheep: - BlackSheep blackSheep = GetComponent(); - enemy = blackSheep; - enemy.enemyNode = this; - break; - case EnemyScript.FailedSample: - FailedSample failedSample = GetComponent(); - enemy = failedSample; - enemy.enemyNode = this; - break; - case EnemyScript.BoundSoul: - BoundSoul boundSoul = GetComponent(); - enemy = boundSoul; - enemy.enemyNode = this; - break; - case EnemyScript.LivingArmor: - LivingArmor livingArmor = GetComponent(); - enemy = livingArmor; - enemy.enemyNode = this; - break; - case EnemyScript.RatWarrior: - RatWarrior ratWarrior = GetComponent(); - enemy = ratWarrior; - enemy.enemyNode = this; - break; - case EnemyScript.SoulMaker: - SoulMaker soulMaker = GetComponent(); - enemy = soulMaker; - enemy.enemyNode = this; - break; - case EnemyScript.Pharmacist: - Pharmacist pharmacist = GetComponent(); - enemy = pharmacist; - enemy.enemyNode = this; - break; - case EnemyScript.Twinbee: - Twinbee twinbee = GetComponent(); - enemy = twinbee; - enemy.enemyNode = this; - break; - case EnemyScript.ReconnaissanceBee: - ReconnaissanceBee reconnaissanceBee = GetComponent(); - enemy = reconnaissanceBee; - enemy.enemyNode = this; - break; - case EnemyScript.PrismReflector: - PrismReflector prismReflector = GetComponent(); - enemy = prismReflector; - enemy.enemyNode = this; - break; - case EnemyScript.PollutionSpreader: - PollutionSpreader pollutionSpreader = GetComponent(); - enemy = pollutionSpreader; - enemy.enemyNode = this; - break; - case EnemyScript.Gravitus: - Gravitus gravitus = GetComponent(); - enemy = gravitus; - enemy.enemyNode = this; - break; - case EnemyScript.Thief: - Thief thief = GetComponent(); - enemy = thief; - enemy.enemyNode = this; - break; - case EnemyScript.Pollutinel: - Pollutinel pollutinel = GetComponent(); - enemy = pollutinel; - enemy.enemyNode = this; - break; - case EnemyScript.ContaminatusImmortalis: - ContaminatusImmortalis contaminatusImmortalis = GetComponent(); - enemy = contaminatusImmortalis; - enemy.enemyNode = this; - break; - case EnemyScript.Leviathan: - Leviathan leviathan = GetComponent(); - enemy = leviathan; - enemy.enemyNode = this; - break; - case EnemyScript.StonePillar: - StonePillar stonePillar = GetComponent(); - enemy = stonePillar; - enemy.enemyNode = this; - break; - case EnemyScript.AcidRainCloud: - AcidRainCloud acidRainCloud = GetComponent(); - enemy = acidRainCloud; - enemy.enemyNode = this; - break; - case EnemyScript.Climavista: - Climavista climavista = GetComponent(); - enemy = climavista; - enemy.enemyNode = this; - break; - } - enemy.ChooseAction(); - enemy.ChooseAimNode(); - } - - public EnemyAction GetRandomAction(DictionaryactionPool) - { - System.Random random = new System.Random(); - float totalWeight = actionPool.Values.Sum(); - float randomNumber = (float)random.NextDouble() * totalWeight; - - float cumulativeWeight = 0f; - foreach (var action in actionPool) - { - cumulativeWeight += action.Value; - if (randomNumber <= cumulativeWeight) - { - return action.Key; - } - } - Debug.Log("actionPool2222大小" + actionPool.Count()); - return actionPool.Keys.Last(); - } - - public void GetEnemyPosition() - { - Debug .Log ("敌人生成在("+positionX +","+positionY +")"); - } - - public int getStepRange() - { - int extraStep = 0; - float stepMultiplie = 1.0f; - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.upSpeed)|| EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.downSpeed)) - { - extraStep += EnemyState.abnormalCondition[AbnormalCondition.upSpeed].value; - } - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disable)) - { - extraStep -= 1; - } - if (EnemyManager.Instance.isEnemyAlive(Name.EnemyName.SoulMaker) && MapUnityManager.Instance.enemyNodeCount > 12) - { - extraStep += 2; - } - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.banStep)) - { - stepMultiplie = 0f; - } - int trueStepRange=EnemyState.stepRange+extraStep; - MathTool.keepNature(ref trueStepRange); - int result=(int)(trueStepRange * stepMultiplie); - return result; - } - public virtual List PreviewColorRange() - { - return null; - } - public virtual bool CanOneDeath() - { - if (EnemyState.currentNumberOfHits - 1 <= 0) - { - return true; - } - else - { - return false; - } - } - public void EnemyTurn() - { - enemy.enemyTurn(); - enemy.enemyTurnEnd(); - /*switch (enemyScript) - { - case EnemyScript.none: - break; - case EnemyScript.ashBeetle: - AshBeetle ashBeetle = GetComponent(); - ashBeetle.enemyTurn(); - break; - case EnemyScript.hoodWanderer: - HoodWanderer hoodWanderer = GetComponent(); - hoodWanderer.enemyTurn(); - break; - case EnemyScript.drowsyShroom: - DrowsyShroom drowsyShroom = GetComponent(); - drowsyShroom.enemyTurn(); - break; - case EnemyScript.skullGuardian: - SkullGuardian skullGuardian = GetComponent(); - skullGuardian.enemyTurn(); - break; - case EnemyScript.skullmage: - SkullMage skullmage = GetComponent(); - skullmage.enemyTurn(); - break; - case EnemyScript.skullWarlock: - SkullWarlock skullWarlock = GetComponent(); - skullWarlock.enemyTurn(); - break; - case EnemyScript.blastFistMushroom: - BlastFistMushroom blastFistMushroom = GetComponent(); - blastFistMushroom.enemyTurn(); - break; - case EnemyScript.parasiticMushroom: - ParasiticMushroom parasiticMushroom = GetComponent(); - parasiticMushroom.enemyTurn(); - break; - case EnemyScript.emberWraith: - EmberWraith emberWraith = GetComponent(); - emberWraith.enemyTurn(); - break; - case EnemyScript.shatteringFistMushroom: - ShatteringFistMushroom shatteringFistMushroom = GetComponent(); - shatteringFistMushroom.enemyTurn(); - break; - case EnemyScript.bone: - Bone bone = GetComponent(); - bone.enemyTurn(); - break; - case EnemyScript.corrosiveSludge: - CorrosiveSludge corrosiveSludge = GetComponent(); - corrosiveSludge.enemyTurn(); - break; - case EnemyScript.darkCloud: - DarkCloud darkCloud = GetComponent(); - darkCloud.enemyTurn(); - break; - case EnemyScript.blackSheep: - BlackSheep blackSheep = GetComponent(); - blackSheep.enemyTurn(); - break; - case EnemyScript.grinfiend: - Grinfiend grinfiend = GetComponent(); - grinfiend.enemyTurn(); - break; - case EnemyScript.polymaw: - Polymaw polymaw = GetComponent(); - polymaw.enemyTurn(); - break; - case EnemyScript.mushroom: - Mushroom mushroom = GetComponent(); - mushroom.enemyTurn(); - break; - }*/ - - } - public void SettlementSkill() - { - if (EnemyState.currentSkillCoolDown>=0) - { - EnemyState.currentSkillCoolDown -= 1; - } - - if (EnemyState.currentMoveCoolDown >= 0) - { - EnemyState.currentMoveCoolDown -= 1; - } - } - public EnemyNode GetEnemyNode() - { - return this; - } - public void EnemyColour() - { - - } - public void AppearAimLine() - { - MapUnity currentMapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - EnemyManager.Instance.AttackRangeInfluencedNode(currentMapUnity, EnemyState.attackRange + getStepRange(),rangePool); - - switch (planAction) - { - case EnemyNode.PlanAction.attack: - if (rangePool.Contains(GameManager.Instance.playerOn)) - { - if (enemyType == EnemyType.enemy && canLineAppre) - { - lineAim.SetActive(true); - lineAim.GetComponent().LateDisappear(1); - canLineAppre = false; - } - } - break; - - case EnemyNode.PlanAction.dashAttack: - if (rangePool.Contains(GameManager.Instance.playerOn)) - { - if (enemyType == EnemyType.enemy && canLineAppre) - { - lineAim.SetActive(true); - lineAim.GetComponent().LateDisappear(1); - canLineAppre = false; - } - } - break; - - case EnemyNode.PlanAction.shoot: - if (rangePool.Contains(GameManager.Instance.playerOn)) - { - if (enemyType == EnemyType.enemy && canLineAppre) - { - lineAim.SetActive(true); - lineAim.GetComponent().LateDisappear(1); - canLineAppre = false; - } - } - break; - - case EnemyNode.PlanAction.aoe: - if (enemyType == EnemyType.enemy && canLineAppre) - { - if (pasth.Count <= EnemyState.attackRange) - { - lineAim.GetComponent().aimGamgObject = GameManager.Instance.player.gameObject; - } - else - { - lineAim.GetComponent().aimGamgObject = pasth[EnemyState.attackRange].gameObject; - } - - lineAim.SetActive(true); - lineAim.GetComponent().LateDisappear(1); - canLineAppre = false; - } - break; - } - } - - //移动函数 - public void FindPath() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX,positionY); - pasth.Clear(); - - pasth = AStarManager.Instance.FindPath(currentNode, GameManager.Instance.playerOn); - } - - private MapUnity getEndNodeTowardsPlayer() - { - MapUnity currentMapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - HashSet shootAbleMapUnity = new HashSet(); - HashSet reachAbleMapUnity = new HashSet(); - HashSet endNodeMapUnityList = new HashSet(); - Dictionary endNodeMapUnityMap = new Dictionary(); - for (int i = 0; i < GameManager.Instance.X.Count; i++) - { - for (int j = 0; j < GameManager.Instance.X[i].Y.Count; j++) - { - shootAbleMapUnity.Add(GameManager.Instance.X[i].Y[j]); - } - } - getNodeTools.checkListShootPass(shootAbleMapUnity,EnemyState.attackRange); - Debug.Log("可射击集合大小:" + shootAbleMapUnity.Count); - shootAbleMapUnity.Remove(currentMapUnity); - getNodeTools.exceptWithEnemyNode(shootAbleMapUnity); - //reachAbleMapUnity.UnionWith(MapUnityManager.Instance.findReachableTiles(currentMapUnity, EnemyState.getStepRange())); - //取交集 - //shootAbleMapUnity.IntersectWith(reachAbleMapUnity); - //交集中找到移动距离最小的点作为最终目的地 - foreach(MapUnity mapUnity in shootAbleMapUnity) - { - try - { - List mapUnities = AStarManager.Instance.FindPathWithEndNode(currentMapUnity, mapUnity); - int step; - if (mapUnities != null) - { - step = mapUnities.Count; - } - else - { - step = 10000; - } - - endNodeMapUnityMap.Add(mapUnity, step); - } - catch(Exception e) - { - Debug.Log("寻路错误地块是X:" + mapUnity.locationX + "Y:" + mapUnity.locationY); - } - - } - endNodeMapUnityList.UnionWith(GetKeysWithMinValue(endNodeMapUnityMap)); - //hashset无法随机,变成数组 - MapUnity[] setArray = new MapUnity[endNodeMapUnityList.Count]; - endNodeMapUnityList.CopyTo(setArray); - Debug.Log("交集大小:" + endNodeMapUnityList.Count); - // 生成随机索引 - System.Random random = new System.Random(); - int randomIndex = random.Next(setArray.Length); - MapUnity randomMapUnity = setArray[randomIndex]; - Debug.Log("目的地是:" + "X:" + randomMapUnity.locationX + "Y:" + randomMapUnity.locationY); - return randomMapUnity; - } - - private MapUnity getEndNodeAwayFromPlayer() - { - MapUnity currentMapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - HashSet nearestMapUnity = new HashSet(); - HashSet endNodeMapUnityList = new HashSet(); - Dictionary endNodeMapUnityMap = new Dictionary(); - endNodeMapUnityList.Add(GameManager.Instance.playerOn); - getNodeTools.getArcNode(endNodeMapUnityList, EnemyState.attackRange); - getNodeTools.exceptWithEnemyNode(endNodeMapUnityList); - foreach (MapUnity mapUnity in endNodeMapUnityList) - { - try - { - List mapUnities = AStarManager.Instance.FindPathWithEndNode(currentMapUnity, mapUnity); - int step; - if (mapUnities != null) - { - step = mapUnities.Count; - } - else - { - step = 10000; - } - - endNodeMapUnityMap.Add(mapUnity, step); - } - catch (Exception e) - { - Debug.Log("寻路错误地块是X:" + mapUnity.locationX + "Y:" + mapUnity.locationY); - } - - } - nearestMapUnity.UnionWith(GetKeysWithMinValue(endNodeMapUnityMap)); - //hashset无法随机,变成数组 - MapUnity[] setArray = new MapUnity[nearestMapUnity.Count]; - nearestMapUnity.CopyTo(setArray); - Debug.Log("交集大小:" + nearestMapUnity.Count); - // 生成随机索引 - System.Random random = new System.Random(); - int randomIndex = random.Next(setArray.Length); - MapUnity randomMapUnity = setArray[randomIndex]; - //Debug.Log("目的地是:" + "X:" + randomMapUnity.locationX + "Y:" + randomMapUnity.locationY); - return randomMapUnity; - } - - public List GetKeysWithMinValue(Dictionary map) - { - if (map == null || map.Count == 0) - { - return new List(); - } - - int minValue = map.Values.Min(); - - List keysWithMinValue = map - .Where(kv => kv.Value == minValue) - .Select(kv => kv.Key) - .ToList(); - - return keysWithMinValue; - } - - public void FindPathTowardsPlayer() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - pasth.Clear(); - - pasth = AStarManager.Instance.FindPathWithEndNode(currentNode, getEndNodeTowardsPlayer()); - } - - public void FindPathAwayFromPlayer() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - pasth.Clear(); - - pasth = AStarManager.Instance.FindPathWithEndNode(currentNode, getEndNodeAwayFromPlayer()); - } - public void Move(MapUnity currentNode , int step) - { - //currentnode移动 - if(pasth !=null ) - { - if (pasth.Count > step + 1) - { - currentNode.enemyNode = null; - currentNode.blocked = false; - currentNode = pasth[step]; - positionX = currentNode.locationX; - positionY = currentNode.locationY; - currentNode.enemyNode = this; - this.transform.position = pasth[step].transform.position; - } - else if (pasth.Count > 1) - { - currentNode.enemyNode = null; - // currentNode.blocked = false; - currentNode = pasth[pasth .Count -1]; - positionX = currentNode.locationX; - positionY = currentNode.locationY; - currentNode.enemyNode = this; - this.transform.position = pasth[pasth.Count - 1].transform.position; - } - else - { - //不移动 - } - } - - } - public void MoveOpposite(MapUnity currentNode, int step) - { - //currentnode移动 - if (oppositePasth != null) - { - for(int i =0;i(); - newEnemyNode.positionX = positionX; - newEnemyNode.positionY = positionY; - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - currentNode.enemyNode = newEnemyNode; - - } - - switch (enemyType) - { - case EnemyType.enemy: - currentActionScript.FadeAttackRangeAll(this); - rangePool.Clear(); - EnemyManager.Instance.statePanel.SetActive(false); - RewardManager.Instance.JudgeEnemyOver(); - Destroy(this.gameObject); - break; - case EnemyType.block: - GetComponent().OnDeath(); - break; - } - - } - - //逃跑 - public virtual void RunAway() - { - DeathVfxCal(); - - - switch (enemyType) - { - case EnemyType.enemy: - currentActionScript.FadeAttackRangeAll(this); - rangePool.Clear(); - EnemyManager.Instance.statePanel.SetActive(false); - RewardManager.Instance.JudgeEnemyOver(); - Destroy(this.gameObject); - break; - case EnemyType.block: - GetComponent().OnDeath(); - break; - } - - } - - public void enemyReward() - { - if (enemyScript == EnemyScript.Pharmacist) - { - RewardManager.Instance.AddRewardTips(RewardManager.RewardType.potion,1.ToString()); - } - if (enemyScript == EnemyScript.Thief) - { - Thief thief = (Thief)enemy; - if (thief.stolenMoney != 0) - { - RewardManager.Instance.AddRewardTips(RewardManager.RewardType.money, thief.stolenMoney.ToString()); - } - if (thief.stolenForgingPointCount != 0) - { - RewardManager.Instance.AddRewardTips(RewardManager.RewardType.forgPoint, thief.stolenForgingPointCount.ToString()); - } - - } - } - //死亡特效 - public void DeathVfxCal() - { - if(deathVfx !=null ) - { - Instantiate(deathVfx, transform.position+new Vector3 (0,0.7f,0), deathVfx.transform.rotation); - } - if (deathParticle != null) - { - Instantiate(deathParticle, transform.position + new Vector3(0, 1, 0), deathParticle.transform.rotation); - } - if (deathParticle_2 != null) - { - Instantiate(deathParticle_2, transform.position + new Vector3(0, 0.8f, 0), deathParticle_2.transform.rotation); - } - } - //发动被破坏效果(用于场地物体) - public virtual IEnumerator ActiveEffect() - { - yield return null; - } - public void boneOnDeath() - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.boomAndPollute)) - { - boomAndPolluteCal(); - } - if (bone_Re != null) - { - var currentenemy = Instantiate(bone_Re, this.transform.position, this.transform.rotation); - EnemyNode newEnemyNode = currentenemy.GetComponent(); - newEnemyNode.positionX = positionX; - newEnemyNode.positionY = positionY; - MapUnity currentNode = GameManager.Instance.X[positionX].Y[positionY]; - currentNode.enemyNode = newEnemyNode; - } - - switch (enemyType) - { - case EnemyType.enemy: - EnemyManager.Instance.statePanel.SetActive(false); - RewardManager.Instance.JudgeEnemyOver(); - Destroy(this.gameObject); - break; - case EnemyType.block: - GetComponent().OnDeath(); - break; - } - - } - - public void boomAndPolluteCal() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - HashSet targetSet=new HashSet(); - targetSet.Add(currentNode); - getNodeTools.getCircleNodeForBoom(targetSet, 1); - foreach (MapUnity target in targetSet) - { - target.switchColorForEnemy(Name.NodeColor.Black); - } - } - - public void deathMarkCal() - { - MapUnity currentNode = GameManager.Instance.X[positionX].Y[positionY]; - HashSet targetSet = new HashSet(); - targetSet.Add(currentNode); - getNodeTools.getCircleNodeForBoom(targetSet, 3); - int bleedCount= EnemyState.abnormalCondition[AbnormalCondition.bleed].value; - SettlementManager.Instance.abnormalConditionWork(AbnormalCondition.bleed, bleedCount, new List(targetSet)); - } - - public void boomCal() - { - MapUnity currentNode = GameManager.Instance.X[positionX].Y[positionY]; - HashSet targetSet = new HashSet(); - targetSet.Add(currentNode); - getNodeTools.getCircleNodeForBoom(targetSet, 1); - int damage = EnemyState.abnormalCondition[AbnormalCondition.boom].value; - foreach (MapUnity target in targetSet) - { - target.switchColorForEnemy(Name.NodeColor.Black); - if (target.Equals(GameManager.Instance.playerOn)) - { - Usermanager.Instance.SufferDamage(damage, null); - } - } - } - - //Buff结算应用函数 - //施加buff效果 - public void sufferAbnormalCondition(string condition, int value) - { - - if (immunityCal(condition,value)) - { - return; - } - switch (condition) - { - case AbnormalCondition.fireSeed: - sufferFireSeed(condition, value); - break; - case AbnormalCondition.wet: - sufferWet(condition, value); - break; - case AbnormalCondition.levelSleep: - sufferLevelSleep(condition, value); - break; - case AbnormalCondition.upSpeed: - case AbnormalCondition.downSpeed: - sufferSpeed(condition, value); - break; - case AbnormalCondition.armor: - EnemyState.maxHP += value; - EnemyState.currentHP += value; - break; - - } - if (EnemyState .abnormalCondition .ContainsKey(condition)) - { - int beforeval = EnemyState.abnormalCondition[condition].value; - int afterval = beforeval + value; - EnemyState.abnormalCondition[condition].value = afterval; - } - else - { - AddEnemyAbnormalCondition(condition,value); - } - - if (condition.Equals(CardFunction.coma)) - { - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - } - if (condition.Equals(CardFunction.sleep)) - { - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - } - abnormalConditionEndCheck(); - enemyUIBar.RefreshEnemyBuffIcon(); - } - - private void sufferSpeed(string condition, int value) - { - //speed的特殊处理 - if (condition.Equals(AbnormalCondition.upSpeed)) - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.downSpeed)) - { - int downLayer = EnemyState.abnormalCondition[AbnormalCondition.downSpeed].value; - int trueLayer = downLayer - value; - if (trueLayer > 0) - { - EnemyState.abnormalCondition[AbnormalCondition.downSpeed].value = trueLayer; - } - else if (trueLayer == 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.downSpeed); - } - else if (trueLayer < 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.downSpeed); - AddEnemyAbnormalCondition(condition, 0 - trueLayer); - } - } - else - { - if (EnemyState.abnormalCondition.ContainsKey(condition)) - { - int beforeval = EnemyState.abnormalCondition[condition].value; - int afterval = beforeval + value; - EnemyState.abnormalCondition[condition].value = afterval; - Debug.Log("加入了:" + condition + "afterval:" + afterval); - } - else - { - AddEnemyAbnormalCondition(condition, value); - } - } - } - else if (condition.Equals(AbnormalCondition.downSpeed)) - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.upSpeed)) - { - int downLayer = EnemyState.abnormalCondition[AbnormalCondition.upSpeed].value; - int trueLayer = downLayer - value; - if (trueLayer > 0) - { - EnemyState.abnormalCondition[AbnormalCondition.upSpeed].value = trueLayer; - } - else if (trueLayer == 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.upSpeed); - } - else if (trueLayer < 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.upSpeed); - AddEnemyAbnormalCondition(condition, 0 - trueLayer); - } - } - else - { - if (EnemyState.abnormalCondition.ContainsKey(condition)) - { - int beforeval = EnemyState.abnormalCondition[condition].value; - int afterval = beforeval + value; - EnemyState.abnormalCondition[condition].value = afterval; - Debug.Log("加入了:" + condition + "afterval:" + afterval); - } - else - { - AddEnemyAbnormalCondition(condition, value); - } - } - } - //enemyUIBar.RefreshEnemyBuffIcon(); - - } - - private bool immunityCal(string condition, int value) - { - bool isImmunityDispose = false; - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.immunity) && !AbnormalCondition.playBuffList.Contains(condition)) - { - isImmunityDispose = true; - EnemyState.abnormalCondition[AbnormalCondition.immunity].value -= 1; - if (EnemyState.abnormalCondition[AbnormalCondition.immunity].value <= 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.immunity); - } - } - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.immunity) && !AbnormalCondition.playUndeterminedBuffList.Contains(condition)&&value<0) - { - isImmunityDispose = true; - EnemyState.abnormalCondition[AbnormalCondition.immunity].value -= 1; - if (EnemyState.abnormalCondition[AbnormalCondition.immunity].value <= 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.immunity); - } - } - return isImmunityDispose; - } - - private void sufferFireSeed(string condition, int value) - { - //firseed的特殊处理 - int damage = 15; - int checkVal = 10; - if (LegacyManager.Instance.relicClassNameList.Contains(Name.Legacy.LegacyNode_VulcanHammer)) - { - damage = 25; - checkVal = 15; - } - if (LegacyManager.Instance.relicClassNameList.Contains(Name.Legacy.LegacyNode_AgnisTorch)) - { - checkVal = 8; - } - int nowValue=0; - if (EnemyState.abnormalCondition.ContainsKey(condition)) - { - nowValue = EnemyState.abnormalCondition[condition].value; - } - int trueValue=nowValue+ value; - int damamgeLayers=0; - if (trueValue >= checkVal) - { - damamgeLayers = trueValue / checkVal; - - } - int afterval = trueValue % checkVal; - Debug.Log("伤害层数是:" + damamgeLayers); - Debug.Log("剩余层数是:" + afterval); - if (damamgeLayers > 0) - { - sufferDamage(damage * damamgeLayers, false); - } - EnemyState.abnormalCondition.Remove(condition); - AddEnemyAbnormalCondition(condition, afterval); - //enemyUIBar.RefreshEnemyBuffIcon(); - - } - - private void sufferWet(string condition, int value) - { - int nowValue = 0; - if (EnemyState.abnormalCondition.ContainsKey(condition)) - { - nowValue = EnemyState.abnormalCondition[condition].value; - } - int trueValue = nowValue + value; - if (trueValue >= 10) - { - if (LegacyManager.Instance.relicClassNameList.Contains(Name.Legacy.LegacyNode_EnchantedConch)) - { - sufferAbnormalCondition(AbnormalCondition.vulnerable, 1); - } - sufferAbnormalCondition(AbnormalCondition.coma, 1); - EnemyState.abnormalCondition.Remove(condition); - - } - else - { - EnemyState.abnormalCondition.Remove(condition); - AddEnemyAbnormalCondition(condition, trueValue); - } - - //enemyUIBar.RefreshEnemyBuffIcon(); - - } - private void sufferLevelSleep(string condition, int value) - { - //firseed的特殊处理 - int nowValue = 0; - if (EnemyState.abnormalCondition.ContainsKey(condition)) - { - nowValue = EnemyState.abnormalCondition[condition].value; - } - int trueValue = nowValue + value; - int sleepLayers = 0; - if (trueValue >= 10) - { - sleepLayers = trueValue / 10; - - } - int afterval = trueValue % 10; - Debug.Log("sleep层数是:" + sleepLayers); - Debug.Log("剩余层数是:" + afterval); - if (sleepLayers > 0) - { - sufferAbnormalCondition(AbnormalCondition.sleep, sleepLayers); - } - EnemyState.abnormalCondition.Remove(condition); - AddEnemyAbnormalCondition(condition, afterval); - //enemyUIBar.RefreshEnemyBuffIcon(); - - } - public void sufferDamage(int damageVal,bool isFromPlayer) - { - if (isFromPlayer==true) - { - thornCal(); - } - bleedRealize(); - acidRainRealize(); - int trueDamage = SufferDamageCalculation(damageVal); - if (trueDamage > EnemyState.shieldValue) - { - int afterVal = trueDamage - EnemyState.shieldValue; - EnemyState.shieldValue = 0; - EnemyState.currentHP -= afterVal; - } - else - { - EnemyState.shieldValue -= trueDamage; - } - Debug.Log("敌人血量" + EnemyState.currentHP); - if (EnemyState.currentHP <= 0) - { - OnDeath(); - } - else - { - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.sleep: - EnemyState.abnormalCondition.Remove(key); - EnemyState.damageMultiplier = 1; - EnemyState.stepRangeMultiplier = 1; - break; - case AbnormalCondition.shedding: - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - HashSet targets = new HashSet { currentNode }; - int count = EnemyState.abnormalCondition[AbnormalCondition.shedding].value; - getNodeTools.getCircleNode(targets, 1); - enemy.RandomPollute(targets, count); - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.weak: - EnemyState.damageMultiplier = 0.75; - break; - case AbnormalCondition.disarm: - EnemyState.damageMultiplier = 0; - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.coma: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - case AbnormalCondition.sleep: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - } - } - foreach (var Buff in EnemyState.abnormalCondition) - { - Debug.Log(Buff.Key + "层数:" + Buff.Value.value); - } - - if(EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.flashPoint)) - { - FlashPointRealize(); - } - } - } - - public void sufferDamageIfKilled(int damageVal, bool isFromPlayer, ref bool ifKilled) - { - if (isFromPlayer == true) - { - thornCal(); - } - bleedRealize(); - acidRainRealize(); - int trueDamage = SufferDamageCalculation(damageVal); - if (trueDamage > EnemyState.shieldValue) - { - int afterVal = trueDamage - EnemyState.shieldValue; - EnemyState.shieldValue = 0; - EnemyState.currentHP -= afterVal; - } - else - { - EnemyState.shieldValue -= trueDamage; - } - Debug.Log("敌人血量" + EnemyState.currentHP); - if (EnemyState.currentHP <= 0) - { - ifKilled=true; - OnDeath(); - } - else - { - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.sleep: - EnemyState.abnormalCondition.Remove(key); - EnemyState.damageMultiplier = 1; - EnemyState.stepRangeMultiplier = 1; - break; - case AbnormalCondition.shedding: - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - HashSet targets = new HashSet { currentNode }; - int count = EnemyState.abnormalCondition[AbnormalCondition.shedding].value; - getNodeTools.getCircleNode(targets, 1); - enemy.RandomPollute(targets, count); - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.weak: - EnemyState.damageMultiplier = 0.75; - break; - case AbnormalCondition.disarm: - EnemyState.damageMultiplier = 0; - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.coma: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - case AbnormalCondition.sleep: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - } - } - foreach (var Buff in EnemyState.abnormalCondition) - { - Debug.Log(Buff.Key + "层数:" + Buff.Value.value); - } - - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.flashPoint)) - { - FlashPointRealize(); - } - } - } - - public void bleedCal() - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - sufferTrueDamage(2); - EnemyState.abnormalCondition[AbnormalCondition.bleed].value -= 1; - if (EnemyState.abnormalCondition[AbnormalCondition.bleed].value <= 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.bleed); - } - - } - } - - public void acidRainRealize() - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.acidRain)) - { - enemy.RandomPollute(getNodeTools.getAllNotBlackNodes(), 3); - } - - } - public void bleedRealize() - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int bleedDamage = 2; - if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.bleedDamage)) - { - bleedDamage += Usermanager.playerAbnormalCondition[AbnormalCondition.bleedDamage].value; - } - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleedHeal)) - { - Usermanager.Instance.recoverHp(bleedDamage); - } - bleed4TurnCostCal(); - bleed3TurnCostCal(); - sufferTrueDamage(bleedDamage); - EnemyState.abnormalCondition[AbnormalCondition.bleed].value -= 1; - if (EnemyState.abnormalCondition[AbnormalCondition.bleed].value <= 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.bleed); - } - - if (LegacyManager.Instance.isUseful(Name.Legacy.LegacyNode_MeatSaw)) - { - bleedRealizeForMeatSaw(); - } - } - - } - - public void bleedRealizeForMeatSaw() - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int bleedDamage = 2; - if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.bleedDamage)) - { - bleedDamage += Usermanager.playerAbnormalCondition[AbnormalCondition.bleedDamage].value; - } - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleedHeal)) - { - Usermanager.Instance.recoverHp(bleedDamage); - } - bleed4TurnCostCal(); - bleed3TurnCostCal(); - sufferTrueDamage(bleedDamage); - EnemyState.abnormalCondition[AbnormalCondition.bleed].value -= 1; - if (EnemyState.abnormalCondition[AbnormalCondition.bleed].value <= 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.bleed); - } - } - - } - - private void bleed4TurnCostCal() - { - if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.bleed4TurnCost)) - { - Usermanager.playerAbnormalCondition[AbnormalCondition.bleed4TurnCost].count += 1; - if (Usermanager.playerAbnormalCondition[AbnormalCondition.bleed4TurnCost].count == 4) - { - GameManager.Instance.playerState.currentCost += 1; - Usermanager.playerAbnormalCondition[AbnormalCondition.bleed4TurnCost].count = 0; - } - } - - } - - private void bleed3TurnCostCal() - { - if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.bleed3TurnCost)) - { - Usermanager.playerAbnormalCondition[AbnormalCondition.bleed3TurnCost].count += 1; - if (Usermanager.playerAbnormalCondition[AbnormalCondition.bleed3TurnCost].count == 3) - { - GameManager.Instance.playerState.currentCost += 1; - Usermanager.playerAbnormalCondition[AbnormalCondition.bleed4TurnCost].count = 0; - } - } - - } - - private void thornCal() - { - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.thorn)) - { - Usermanager.Instance.SufferTrueDamage(EnemyState.abnormalCondition[AbnormalCondition.thorn].value); - EnemyState.abnormalCondition[AbnormalCondition.thorn].value -= 1; - if (EnemyState.abnormalCondition[AbnormalCondition.thorn].value <= 0) - { - EnemyState.abnormalCondition.Remove(AbnormalCondition.thorn); - } - - } - } - - public void sufferTrueDamage(int damageVal) - { - if (damageVal > EnemyState.shieldValue) - { - int afterVal = damageVal - EnemyState.shieldValue; - EnemyState.shieldValue = 0; - EnemyState.currentHP -= afterVal; - } - else - { - EnemyState.shieldValue -= damageVal; - } - Debug.Log("敌人血量" + EnemyState.currentHP); - if (EnemyState.currentHP <= 0) - { - OnDeath(); - } - else - { - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.sleep: - EnemyState.abnormalCondition.Remove(key); - EnemyState.damageMultiplier = 1; - EnemyState.stepRangeMultiplier = 1; - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.weak: - EnemyState.damageMultiplier = 0.75; - break; - case AbnormalCondition.disarm: - EnemyState.damageMultiplier = 0; - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.coma: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - case AbnormalCondition.sleep: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - } - } - - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.flashPoint)) - { - FlashPointRealize(); - } - } - } - - public void enemyTurnSettleInit() - { - EnemyState.damageMultiplier = 1; - EnemyState.stepRangeMultiplier = 1; - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.weak: - EnemyState.damageMultiplier = 0.75; - break; - case AbnormalCondition.disarm: - EnemyState.damageMultiplier = 0; - break; - } - } - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - switch (key) - { - case AbnormalCondition.coma: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - case AbnormalCondition.sleep: - EnemyState.damageMultiplier = 0; - EnemyState.stepRangeMultiplier = 0; - break; - } - } - } - - - public void enemyTurnSettle(int settleTurn) - { - //enemy.enemyTurnEnd(); - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - - EnemyState.abnormalCondition[key].SettleEnemy(this); - abnormalConditionEndCheck(); - enemyUIBar. RefreshEnemyBuffIcon(); - } - } - - public void enemyRefreshUIIcon(int settleTurn) - { - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - enemyUIBar.RefreshEnemyBuffIcon(); - } - } - - public void enemyShieldSettle(int settleTurn) - { - EnemyState.shieldValue = 0; - } - - public void enemyTurnBeginSettle(int settleTurn) - { - EnemyState.shieldValue = 0; - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - EnemyState.abnormalCondition[key].SettleEnemyBegin(this); - abnormalConditionEndCheck(); - //有bug - enemyUIBar.RefreshEnemyBuffIcon(); - } - enemy.enemyTurnBegin(); - } - - public void abnormalConditionEndCheck() - { - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - if (AbnormalCondition.canNegativeNumberList.Contains(key)) - { - if (EnemyState.abnormalCondition[key].value == 0) - { - EnemyState.abnormalCondition.Remove(key); - } - } - else - { - if (EnemyState.abnormalCondition[key].value <= 0) - { - EnemyState.abnormalCondition.Remove(key); - } - } - - } - } - - //获取格子 - public MapUnity GetMapGrid() - { - return getNodeTools.LocationToGetNode(positionX,positionY); - } - - //施加新Buff - public void AddEnemyAbnormalCondition(string condition, int value) - { - Debug.Log(condition); - if(BuffDataManager.Instance.abnormalCondition.ContainsKey(condition)) - { - Debug.Log(condition+" success"); - EnemyState.abnormalCondition.Add(condition, BuffDataManager.Instance.abnormalCondition[condition].NewBuff(value)); - } - } - - public int ExpectSufferDamageCal((float, int,int) damge,MapUnity target) - { - int trueDamage = 0; - for (int i = 0; i < damge.Item2; i++) - { - Debug.Log("Item1是" + damge.Item1); - trueDamage += SufferDamageCalculation((int)damge.Item1); - } - Debug.Log("trueDamage是" + trueDamage); - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int canBleedCount = 0; - canBleedCount += damge.Item2; - if (damge.Item3!=0) - { - canBleedCount += CardManager.getRepelCount(target, damge.Item3); - } - /*if () - { - - }*/ - int bleedCount = Math.Min(EnemyState.abnormalCondition[AbnormalCondition.bleed].value, canBleedCount); - int bleedDamage = 2; - if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.bleedDamage)) - { - bleedDamage += Usermanager.playerAbnormalCondition[AbnormalCondition.bleedDamage].value; - } - trueDamage += bleedCount * bleedDamage; - } - return trueDamage; - } - - #region 行动动画 - public IEnumerator MeleeAttackAim() - { - anim.enabled = false; - Transform moveObject = transform.GetChild(0); - Vector3 startPos = moveObject.position; - Vector3 endPos = GameManager.Instance.player.transform.position; - endPos .y = startPos.y; - bool move = true; - float time = 0; - Debug.Log("开始攻击" + startPos + "结束" + endPos); - Debug.Log("开始攻击" + moveObject.name); - while (move ) - { - moveObject.position = Vector3.Lerp(startPos, endPos,meleeAttackSpeedCurve.Evaluate( time += Time.deltaTime * meleeAttackSpeed)); - if (time >= 1) - { - move = false; - } - - Debug.Log("攻击"+ moveObject.position); - yield return null; - } - move = true; - time = 0; - while (move) - { - moveObject.position = Vector3.Lerp(endPos,startPos,meleeAttackSpeedCurve.Evaluate(time += Time.deltaTime * meleeAttackSpeed)); - if (time >= 1) - { - move = false; - } - - yield return null; - } - - anim.enabled = true; - } - #endregion - - #region Buff结算函数 - //结算易伤 - public int SufferDamageCalculation(int damage) - { - if (EnemyState .abnormalCondition .ContainsKey(AbnormalCondition.vulnerable)) - { - EnemyState .sufferDamageMultiply = 1.5f; - } - else - { - EnemyState. sufferDamageMultiply = 1f; - } - float stoneSkinMultiply = 1f; - - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.stoneSkin)) - { - - float count = EnemyState.abnormalCondition[AbnormalCondition.stoneSkin].value; - - stoneSkinMultiply -= 0.2f * count; - } - float halfDamageInBlackMultiply = 1f; - // MapUnity currentNode = GameManager.Instance.X[positionX].Y[positionY]; - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.halfDamageInBlack)&&Name.NodeColor.EnemyColor.Contains(currentNode.whoColour)) - { - stoneSkinMultiply = 0.5f; - } - int trueDamage = (int)(EnemyState.sufferDamageMultiply * damage* stoneSkinMultiply* halfDamageInBlackMultiply); - return trueDamage; - } - - //结算伤害 - public int DamageCalculation(int damage) - { - int angerUpperDamage = 0, angerDownDamage = 0; - - if (EnemyState .abnormalCondition .ContainsKey(AbnormalCondition.angerUpperDamage)) - { - angerUpperDamage = EnemyState.abnormalCondition[AbnormalCondition.angerUpperDamage].value; - } - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.weak)) - { - EnemyState.damageMultiplier = 0.75f; - } - else - { - EnemyState.damageMultiplier = 1f; - } - damage = (int)((damage + angerUpperDamage - angerDownDamage) * EnemyState.damageMultiplier); - - - return damage; - } - - //护盾计算函数 - public int ShieldCalculation(int shield) - { - int shieldValue = 0; - - if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.shieldUpperValue)) - { - shieldValue += EnemyState.abnormalCondition[AbnormalCondition.shieldUpperValue].value; - } - - shield += shieldValue; - - return shield; - } - - //闪位实现 - public void FlashPointRealize() - { - HashSet targetNodeList= new HashSet(); - targetNodeList.Add(GameManager.Instance.X[positionX].Y[positionY]); - getNodeTools.getCircleNodeForEnemy(targetNodeList,1); - targetNodeList.Remove(GameManager.Instance.X[positionX].Y[positionY]); - //随机移动 - - - MapUnity targetNode = getNodeTools.getRandomElement(targetNodeList); - MapUnity currentNode = GameManager.Instance.X[positionX].Y[positionY]; - - currentNode.enemyNode = null; - currentNode.blocked = false; - positionX = targetNode.locationX; - positionY = targetNode.locationY; - targetNode.enemyNode = this; - this.transform.position = targetNode.transform.position; - - //随机污染 - //RandomColour(2); - } - - //随机污染 - /* public void RandomColour(int number) - { - List playerMap = new List(); - for(int x=0;x< GameManager.Instance.X.Count;x++) - { - foreach (var node in GameManager.Instance.X[x].Y) - { - if(node .whoColour == MapUnity.WhoColour.playerColour ) - { - playerMap.Add(node); - } - } - - } - for(int i=0;i CalculatePath(List linePath, float posCount, Vector3 lineStart, Vector3 lineMiddel, Vector3 lineEnd) - { - linePath.Clear(); - - for (int i = 0; i < posCount; i++) - { - Vector3 currentPoint = CalculateBezierPoint(lineStart, lineMiddel, lineEnd, i / posCount); - linePath.Add(currentPoint); - Debug.Log("currentPoint" + currentPoint); - } - return linePath; - } - public Vector3 CalculateBezierPoint(Vector3 p0, Vector3 p1, Vector3 p2, float t) - { - Debug.Log("t" + t); - float u = 1 - t; - float tt = t * t; - return u * u * p0 + 2 * t * u * p1 + tt * p2; - } - #endregion -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs.meta deleted file mode 100644 index a16a6490..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b93e606dce1c400408bd059eaaa399b2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 50 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs deleted file mode 100644 index c5f44a4a..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAimLine : MonoBehaviour -{ - public LineRenderer lineRenderer; - public float density =2f; //密度 - public float speed;//速度 - - private Material material; - private int id = Shader.PropertyToID("_MainTex"); - private Vector2 offset = new Vector2(0, 0); - - private float disappearTimer = 2;//消失时间 - public float currentdisappearTime = 0; - - [Header("目标")] - public GameObject aimGamgObject; - - private void OnEnable() - { - material = lineRenderer.material; - aimGamgObject = GameManager.Instance.player.gameObject; - } - - void Update() - { - lineRenderer.SetPosition(0, this.transform.position); - lineRenderer.SetPosition(1, aimGamgObject.transform.position); - - float lineLength = (lineRenderer.GetPosition(1) - lineRenderer.GetPosition(0)).magnitude; - material.SetTextureScale(id, new Vector2(lineLength * density, 0)); - - offset -= new Vector2(speed, 0); - material.SetTextureOffset(id, offset); - - if(currentdisappearTime >0) - { - currentdisappearTime -= Time.deltaTime; - Color color = new Color(1f, 0, 0, (currentdisappearTime/disappearTimer)); - material.color = color; - if(currentdisappearTime /disappearTimer <=0.01) - { - currentdisappearTime = 0; - this.gameObject.SetActive(false); - } - } - } - - public void Disappear() - { - disappearTimer = 2f; - currentdisappearTime = disappearTimer; - } - public void Disappear(int time) - { - disappearTimer = time; - currentdisappearTime = disappearTimer; - } - public void LateDisappear(int LateTime) - { - lineRenderer.SetPosition(0, this.transform.position); - lineRenderer.SetPosition(1, GameManager.Instance.player.transform.position); - Color color = new Color(1f, 0, 0, 1f); - material.color = color; - Invoke("Disappear", LateTime); - } - public void Appear() - { - lineRenderer.SetPosition(0, this.transform.position); - lineRenderer.SetPosition(1, GameManager.Instance.player.transform.position); - Color color = new Color(1f, 0, 0, 1f); - material.color = color; - //this.gameObject.SetActive(true); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs.meta deleted file mode 100644 index a1057e0d..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyAimLine.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0e85732096b0d414f9d6f9ea2e10f06f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs deleted file mode 100644 index 121be39b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -using System.Linq; -using TMPro; - -public class EnemyUIBar : MonoBehaviour -{ - [Header("常驻角色属性")] - public Image HPBar; - public TMP_Text currentHPText; - public TMP_Text maxHPText; - public TMP_Text sheildText; - public EnemyNode enemyNode; - - [Header("意图图标")] - public Image planImage; - public TMP_Text attackDamageText; - public GameObject moveIcon; - [Header("超出攻击范围图标")] - public GameObject outAttackRange; - [Header("Buff图标显示")] - public List buffIconList = new List(); - public GameObject buffIcon; - public GameObject buffPanle; - - [Header("计数标量")] - public float time; - float lastTime=0; - [Header("Buff详情")] - public BuffInforOnMouse buffInforOnMouse; - [Header("虚血控件")] - public bool isSync = true ;//中断每帧刷新 - public Image expHPBar; - public Image expAfterHPBar; - public ExpHpFlash sheildFlash; - - [Header("意图详情")] - public GameObject planPanle; - public TMP_Text planInforText; - public Transform planPanlePos; - - private void Update() - { - if(isSync ) - { - sheildText.text = enemyNode.EnemyState.shieldValue.ToString(); - currentHPText.text = enemyNode.EnemyState.currentHP.ToString(); - } - - HPBar.fillAmount = enemyNode .EnemyState .currentHP /enemyNode .EnemyState .maxHP; - maxHPText.text = enemyNode.EnemyState.maxHP.ToString(); - - - } - - //切换意图 - public void SwitchIntention(EnemyAction enemyPlanAction) - { - planImage.sprite = enemyPlanAction.sprite; - - - enemyNode .currentActionScript = enemyPlanAction; - enemyNode.currentActionScript.AttackRange(enemyNode); - //enemyNode.enemy.SettlePlannText(enemyNode.enemy.enemyAction); - } - - //鼠标进入 - private void OnMouseEnter() - { - - if (TurnMaster.Instance.turn == TurnMaster.Turn.playerTurn && GameManager.Instance.onDrag == false && (TurnMaster.Instance.playerAction == TurnMaster.PlayerAction.none|| TurnMaster.Instance.playerAction == TurnMaster.PlayerAction.banAction)) - { - //意图显示 - ShowPlanInfor(); - //buff显示 - buffInforOnMouse.ShowBuffInfor(); - - //显示攻击范围 - if (enemyNode.currentActionScript != null) - { - //重新计算攻击范围 - MapUnity currentMapUnity = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - //EnemyManager.Instance.AttackRangeInfluencedNode(currentMapUnity, enemyNode.EnemyState.attackRange + enemyNode.getStepRange(), enemyNode.rangePool); - enemyNode.LoadRange(); - enemyNode.ShowRange(); - //enemyNode.currentActionScript.ShowAttackRange(enemyNode); - - if (enemyNode.currentActionScript.isAiming) - { - enemyNode.lineAim.SetActive(true); - enemyNode.lineAim.GetComponent().Appear(); - } - } - - - - } - } - - //鼠标悬停 - private void OnMouseOver() - { - /* EnemyManager.Instance. statePanel.SetActive(true); - EnemyManager.Instance.statePanel.transform.position = Mouse.current.position.value; - - EnemyState_SO enemyState = enemyNode.EnemyState; - EnemyManager.Instance.nameText.text = enemyState.enemyName; - EnemyManager.Instance.enemyIcon.sprite = enemyState.enemyIcon; - EnemyManager.Instance.hPText.text = enemyState.currentHP.ToString() + "/" + enemyState.maxHP.ToString(); - EnemyManager.Instance.attackText.text = (enemyState.damage * enemyState.damageMultiplier).ToString (); - EnemyManager.Instance.stepRangeText.text = (enemyState.stepRange * enemyState.stepRangeMultiplier).ToString(); - EnemyManager.Instance.attackRangeText.text = enemyState.attackRange.ToString(); - EnemyManager.Instance.speedText.text = enemyState.speed.ToString(); - */ - //攻击范围显示 - /* if (TurnMaster.Instance.turn == TurnMaster.Turn.playerTurn && GameManager.Instance.onDrag == false && TurnMaster.Instance.servantAction != TurnMaster.ServantAction.useSkill) - { - // MapUnity currentMapUnity = getNodeTools.LocationToGetNode(enemyNode.positionX,enemyNode.positionY); - if (enemyNode.currentActionScript != null) - { - enemyNode.currentActionScript.ShowAttackRange(enemyNode); - - if (enemyNode.currentActionScript.isAiming) - { - enemyNode.lineAim.SetActive(true); - enemyNode.lineAim.GetComponent().Appear(); - } - } - }*/ - - } - private void OnMouseExit() - { - //攻击范围关闭 - // EnemyManager.Instance.statePanel.SetActive(false); - - enemyNode.lineAim.SetActive(false); - //遍历影响池变色 - if (enemyNode != null && enemyNode.currentActionScript!= null) - { - enemyNode.currentActionScript.FadeAttackRange(enemyNode); - } - //意图详情关闭 - planPanle.SetActive(false); - //buff详情关闭 - buffInforOnMouse.FadeBuffInfor(); - } - - //意图详情显示 - public void ShowPlanInfor() - { - planInforText.text = enemyNode.stateText; - planPanle.SetActive(true); - - Vector3 screenPos = Camera.main.WorldToScreenPoint(planPanlePos .position); - Vector3 worldPos = Camera.main.ScreenToWorldPoint(new Vector3(screenPos.x, screenPos.y, 7));//世界坐标转视图坐标,把位置拉到近摄像机平面 - planPanle.transform.position = worldPos; - } - //异常Buff显示 - public void RefreshEnemyBuffIcon() - { - - EnemyState_SO EnemyState = enemyNode.EnemyState; - //先清空 - foreach (var icon in buffIconList) - { - Destroy(icon); - } - buffIconList.Clear(); - buffInforOnMouse.buffNodeList.Clear(); - //再刷新 - foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) - { - if (EnemyState.abnormalCondition[key].value > 0) - { - var buff = Instantiate(buffIcon, buffPanle.transform); - EnemyState.abnormalCondition[key].EnemyUIShow(buff, key, enemyNode); - - //装配buffNode - BuffNode buffNode = buff.GetComponent(); - buffNode.buffName = key; - buffNode.buffValue = EnemyState.abnormalCondition[key].value.ToString(); - buffNode.buffIcon = buff.transform.GetChild(0).GetComponent().sprite; - buffInforOnMouse.buffNodeList.Add(buffNode); - - buffIconList.Add(buff); - } - - } - - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs.meta deleted file mode 100644 index dab9b4c3..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyUI/Enemy/EnemyUIBar.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aa7e6a934ffbf8943a251ae27afd29ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs deleted file mode 100644 index 01bb32dd..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs +++ /dev/null @@ -1,155 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class FailedSample: Enemy -{ - - - - - - private void Start() - { - enemyNode = GetComponent(); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.corrode, 1); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_FailedSample, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attackAndPollute), 1.0f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_AttackAndPollution: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - } - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_AttackAndPollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_AttackAndPollution: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText, "造成" + attackText + "点伤害并随机污染附近三个地块。至多移动" + stepRangeText + "个格子。移动时污染所站地块。"); - break; - - } - - } - - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - UnityEngine.Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_AttackAndPollution: - yield return StartCoroutine(MeleeAttackAction()); - break; - } - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (Name.NodeColor.EnemyColor.Contains(currentNode.whoColour)) - { - yield return null; - } - HashSet targetDebuff = new HashSet(); - HashSet debuffList = new HashSet(AbnormalCondition.enemyDebuffList); - targetDebuff = MathTool.GetRandomElements(debuffList, 1); - enemyNode.sufferAbnormalCondition(targetDebuff.FirstOrDefault(), 2); - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_AttackAndPollution: - canMove = true; - canAttack = true; - canAoe = false; - break; - } - } - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targets = new HashSet { currentNode}; - getNodeTools.getCircleNode(targets, 1); - targets.Remove(currentNode); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - RandomPollute(targets, 3); - RandomPollute(new HashSet { currentNode }, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA,1); - RandomPollute(targets, 3); - RandomPollute(new HashSet { currentNode }, 1); - } - } - } - } - -} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs.meta deleted file mode 100644 index d4206b23..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/FailedSample.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5d91be1662d0ad545add1773ee2fad39 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs deleted file mode 100644 index 5290029f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Gravitus : Enemy -{ - - - - private void Start() - { - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attackAndPollute), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spellAndShield), 0.4f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Spell: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_SpellAndShield: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_AttackAndPollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_AttackAndPollution: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode, " ", "对玩家施加一层致残"); - break; - case EnemyAction_SpellAndShield: - enemyNode.currentActionScript.SettleText(enemyNode, " ", "吸收2范围内污染地块,获得吸收数量*2的护盾"); - break; - case EnemyAction_AttackAndPollution: - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText, "造成" + attackText + "点伤害并污染其1范围地块"); - break; - - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_Spell: - yield return StartCoroutine(DebuffAction()); - break; - case EnemyAction_SpellAndShield: - yield return StartCoroutine(PolluteAction()); - break; - case EnemyAction_AttackAndPollution: - yield return StartCoroutine(MeleeAttackAction()); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Spell: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyAction_SpellAndShield: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyAction_AttackAndPollution: - canMove = true; - canAttack = true; - canAoe = false; - break; - } - } - - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet=new HashSet { GameManager.Instance.playerOn }; - getNodeTools.getCircleNodeForEnemy(targetSet, 1); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - PolluteNodes(targetSet,Name.NodeColor.Black); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - PolluteNodes(targetSet, Name.NodeColor.Black); - } - } - } - } - - public IEnumerator ThrowAttackAction(int count) - { - int range = 2; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (currentNode.whoColour == Name.NodeColor.Black) - { - range = 3; - } - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - //yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AoeDamage(getNodeTools.getNodesCount(Name.Color.Black), count, GameManager.Instance.playerOn, range); - } - yield return null; - } - - public IEnumerator DebuffAction() - { - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.disable, 1); - yield return new WaitForSeconds(0.5f); - } - - public IEnumerator PolluteAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - targets = new HashSet { currentNode }; - getNodeTools.getCircleNodeForBoom(targets, 2); - int count = ClearNodesReturnCount(targets); - enemyNode.EnemyState.shieldValue += count * 2; - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs.meta deleted file mode 100644 index 40523968..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Gravitus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d462e2453c896341b99bbf6392d8e38 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs deleted file mode 100644 index 672cb7f7..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class BlockNode : EnemyNode -{ - [Header("已破坏标志,防止重复触发效果")] - public bool isDestroying; - [Header("破坏时粒子效果")] - public GameObject destroyParticle; - public void OnEnable() - { - EnemyManager.Instance.enemyObservers.Add(this); - - if (templateEnemyState != null) - EnemyState = Instantiate(templateEnemyState); - - blockUIBar = GetComponent(); - } - - private void OnDisable() - { - if (EnemyManager.Instance != null) - { - EnemyManager.Instance.enemyObservers.Remove(this); - } - } - private void Start() - { - if (blockUIBar == null) - { - CreatEnemyUIBar(this); - } - lasteHp = (int)EnemyState.currentHP; - } - public override void CreatEnemyUIBar(EnemyNode enemyNode) - { - followPoint.localPosition = followPointPostion; - enemyUI = Instantiate(EnemyManager.Instance.blockUIBar , enemyNode.followPoint.position, followPoint.rotation); - enemyUI.transform.SetParent(enemyNode.transform); - blockUIBar = enemyUI.GetComponent(); - blockUIBar.CreatSartHp(EnemyState.currentNumberOfHits); - // blockUIBar.enemyNode = enemyNode; - } - - public override void OnDeath() - { - Destroy(this.gameObject); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs.meta deleted file mode 100644 index 228f6b6c..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/BlockNode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cf819d57070dbab4a95ad54cedacd2fa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs deleted file mode 100644 index 674a844f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Boom : BlockNode -{ - public int damage = 4; - public override void OnDeath() - { - // StartCoroutine(BoomdAndDestory()); - } - public override IEnumerator ActiveEffect() - { - if (isDestroying == false) - { - isDestroying = true; - yield return StartCoroutine(BoomdAndDestory()); - } - } - IEnumerator BoomdAndDestory() - { - //计算角度 - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX,positionY); - yield return StartCoroutine(CAngle(currentNode)); - currentNode.blocked = false; - currentNode.enemyNode = null; - //结算旋涡 - GameManager.Instance.BroadCastWhirlpoolEffectSycn(); - //生成爆炸特效并摧毁此物体 - Instantiate(destroyParticle, transform.position, destroyParticle.transform.rotation); - yield return null; - Destroy(this.gameObject); - yield break; - } - public override List PreviewColorRange() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); - List effectRangePreviewPool = new List(); - - Vector3 direction = transform.position - GameManager.Instance.player.transform.position; - float angle1 = Vector3.SignedAngle(transform.forward, direction, transform.up); - - if (angle1 < 0) - { - angle1 += 360f; - } - if (angle1 >= 300f) - { - angle1 = 330f; - } - else if (angle1 >= 240f) - { - angle1 = 270f; - } - else if (angle1 >= 180f) - { - angle1 = 210f; - } - else if (angle1 >= 120f) - { - angle1 = 150f; - } - else if (angle1 >= 60f) - { - angle1 = 90f; - } - else if (angle1 >= 0f) - { - angle1 = 30f; - } - - effectRangePreviewPool = getNodeTools.setEffectRangePreviewNoCard("4_1", angle1, currentNode).ToList(); - - foreach (var mapNode in effectRangePreviewPool) - { - // Vector3 pos = mapNode.transform.position; - // pos.y = particlePoint.position.y; - // var bluePartical = Instantiate(ParticalManager.Instance.redParticleEffect,pos, ParticalManager.Instance.redParticleEffect.transform.rotation); - // bluePartical.transform.SetParent(currentNode.transform); - mapNode.switchPreColor(currentNode.colorUnderAttack); - } - return effectRangePreviewPool; - } - IEnumerator CAngle(MapUnity currentNode) - { - List effectRangePreviewPool = new List(); - - Vector3 direction = transform.position- GameManager.Instance.player.transform.position ; - float angle1 = Vector3.SignedAngle(transform.forward, direction, transform.up); - - if (angle1 < 0) - { - angle1 += 360f; - } - if (angle1 >= 300f) - { - angle1 = 330f; - } - else if (angle1 >= 240f) - { - angle1 = 270f; - } - else if (angle1 >= 180f) - { - angle1 = 210f; - } - else if (angle1 >= 120f) - { - angle1 = 150f; - } - else if (angle1 >= 60f) - { - angle1 = 90f; - } - else if (angle1 >= 0f) - { - angle1 = 30f; - } - - effectRangePreviewPool = getNodeTools.setEffectRangePreviewNoCard("4_1", angle1, currentNode).ToList (); - - // SettlementManager.Instance.damageWork(damage, effectRangePreviewPool, -1); - - foreach (var mapNode in effectRangePreviewPool ) - { - // Vector3 pos = mapNode.transform.position; - // pos.y = particlePoint.position.y; - // var bluePartical = Instantiate(ParticalManager.Instance.redParticleEffect,pos, ParticalManager.Instance.redParticleEffect.transform.rotation); - // bluePartical.transform.SetParent(currentNode.transform); - mapNode.switchColor(currentNode. colorUnderAttack); - if(mapNode .enemyNode != null ) - { - mapNode.enemyNode.EnemyState.currentHP -= 4; - } - - } - - yield return null; - } -} \ No newline at end of file diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs.meta deleted file mode 100644 index 6bde2607..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Boom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4e23452b3c4954f409d3aecbaa273cb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs deleted file mode 100644 index b5e54d13..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Box : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("宝箱奖品")] - public List rewardList = new List(); - - public enum BlockType - { - block, - rock, - box - } - public BlockType blockType; - - private void Start() - { - enemyNode = GetComponent(); - } - - public void OnDeath() - { - //清除 - switch (blockType) - { - case BlockType.block: - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - currentNode.enemyNode = null; - currentNode.blocked = false; - Destroy(this.gameObject); - break; - case BlockType.rock: - break; - case BlockType.box: - //生成奖励 - if (rewardList.Count > 0) - { - Instantiate(rewardList[Random.Range(0, rewardList.Count)], this.transform.position, Quaternion.identity); - } - MapUnity current = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - current.enemyNode = null; - current.blocked = false; - Destroy(this.gameObject); - break; - } - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs.meta deleted file mode 100644 index 0dd9f2d0..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Box.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 58499696b45f72a4184c1a705407a923 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs deleted file mode 100644 index 95f2418f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class TNTBucket : BlockNode -{ - public override void OnDeath() - { - // StartCoroutine(BoomdAndDestory()); - } - public override IEnumerator ActiveEffect() - { - if (isDestroying == false) - { - isDestroying = true; - yield return StartCoroutine(DrawCardAndDestory()); - } - } - IEnumerator DrawCardAndDestory() - { - MapUnity mapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - foreach (var node in mapUnity.unitPool ) - { - if(node != null && node .gameObject .activeInHierarchy ==true ) - { - node.switchColor(mapUnity . colorUnderAttack); - if (node .enemyNode != null) - { - node.enemyNode.EnemyState.currentHP -= 4; - } - } - } - mapUnity.blocked = false; - mapUnity.enemyNode = null; - //结算旋涡 - yield return null; - GameManager.Instance.BroadCastWhirlpoolEffectSycn(); - //生成爆炸特效并摧毁此物体 - Instantiate(destroyParticle, transform.position, destroyParticle.transform.rotation); - yield return null; - Destroy(this.gameObject); - yield break; - } - - public override List PreviewColorRange() - { - MapUnity mapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - List effectRangePreviewPool = new List(); - foreach (var node in mapUnity.unitPool) - { - if (node != null) - { - effectRangePreviewPool.Add(node); - node.switchPreColor(mapUnity.colorUnderAttack); - } - } - return effectRangePreviewPool; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs.meta deleted file mode 100644 index d3dbfe6c..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/TNTBucket.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 37b795f1ee3c9514388b0e658e09a7cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs deleted file mode 100644 index 92d88655..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Tree : BlockNode -{ - public int drawCardCount=2; - public override void OnDeath() - { - /*if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.banDrawCard)) - { - } - else - { - StartCoroutine(DrawCardAndDestory()); - }*/ - } - public override IEnumerator ActiveEffect() - { - if(isDestroying ==false ) - { - isDestroying = true; - yield return StartCoroutine(DrawCardAndDestory()); - } - - } - IEnumerator DrawCardAndDestory() - { - MapUnity mapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - yield return TurnMaster.Instance.StartCoroutine(TurnMaster.Instance.drawCards(drawCardCount)); - mapUnity.blocked = false; - mapUnity.enemyNode = null; - - //生成爆炸特效并摧毁此物体 - Instantiate(destroyParticle, transform.position, destroyParticle.transform.rotation); - yield return null; - Destroy(this.gameObject); - yield break; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs.meta deleted file mode 100644 index 0dc89c8f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Tree.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7ab239a945e04874b9c7b6623dafa738 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs deleted file mode 100644 index ab52f10b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UIElements; - -public class Vacancy : BlockNode -{ - public int drawCardCount = 2; - private void Start() - { - if (blockUIBar == null) - { - CreatEnemyUIBar(this); - - } - lasteHp = (int)EnemyState.currentHP; - enemyUI.SetActive(false); - } - public override void OnDeath() - { - - } - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs.meta deleted file mode 100644 index b05b13bd..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/BlockNode/Vacancy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bc7c825b2060cb44ab9a88f267adf20d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/TakerOverNode/ItemTakerOverNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/TakerOverNode/ItemTakerOverNode.cs index e6fcf647..ec94a813 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/TakerOverNode/ItemTakerOverNode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Item/TakerOverNode/ItemTakerOverNode.cs @@ -37,39 +37,4 @@ public class ItemTakerOverNode : MonoBehaviour return mapUnities; } - - public void GenerateBlockItem(MapUnity currentMapUnity,GameObject prefab) - { - switch (blockType) - { - case BlockType.common: - Vector3 pos = currentMapUnity.transform.position; - pos.y = 1; - var block = Instantiate(prefab, pos, Quaternion.identity); - currentMapUnity.enemyNode = block.GetComponent(); - currentMapUnity.enemyNode.positionX = currentMapUnity.locationX; - currentMapUnity.enemyNode.positionY = currentMapUnity.locationY; - currentMapUnity.blocked = true; - break; - case BlockType.whirlpool: - Vector3 pos2 = currentMapUnity.transform.position; - pos.y = 1; - var whirlpool = Instantiate(prefab, pos2, Quaternion.identity); - Whirlpool whirlpoolS = whirlpool.GetComponent(); - whirlpoolS.posX = currentMapUnity.locationX; - whirlpoolS.posY = currentMapUnity.locationY; - break; - case BlockType.vacancy: - Vector3 pos3 = currentMapUnity.transform.position; - pos.y = 1; - var vacancy = Instantiate(prefab, pos3, Quaternion.identity); - currentMapUnity.enemyNode = vacancy.GetComponent(); - currentMapUnity.enemyNode.positionX = currentMapUnity.locationX; - currentMapUnity.enemyNode.positionY = currentMapUnity.locationY; - currentMapUnity.blocked = true; - currentMapUnity .CylinderFloor .SetActive(false); - break; - } - - } } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs deleted file mode 100644 index ad53d971..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs +++ /dev/null @@ -1,195 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Leviathan : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.stoneSkin, 4); - enemyNode.sufferAbnormalCondition(AbnormalCondition.shedding, 7); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attackAndPollute), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spellAndAttack), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.4f); - enemyNode.sufferAbnormalCondition(AbnormalCondition.stoneSkin, 4); - enemyNode.sufferAbnormalCondition(AbnormalCondition.shedding, 7); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_Spell: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_AttackAndPollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - } - - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_AttackAndPollution: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.2f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_AttackAndPollution: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText, "以玩家为中心1格投射,造成" + attackText + "点伤害并污染周围一格地块,至多移动" + stepRangeText + "个格子"); - break; - case EnemyAction_SpellAndAttack: - enemyNode.currentActionScript.SettleText(enemyNode, "", "消耗所有污染地块,对全场造成伤害"); - break; - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode, "", "恢复污染地块数量的生命"); - break; - } - - } - - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_SpellAndAttack: - yield return StartCoroutine(AoeAction()); - break; - case EnemyAction_AttackAndPollution: - yield return StartCoroutine(ThrowAttackAction(1, enemyNode.currentActionScript.colA, 1, aimNode)); - break; - case EnemyAction_Spell: - yield return StartCoroutine(HealAction()); - break; - } - - } - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyAction_AttackAndPollution: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_Spell: - canMove = true; - canAttack = false; - canAoe = false; - break; - } - } - - - public override IEnumerator ThrowAttackAction(int range, int damage, int count, MapUnity target) - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet = new HashSet { target }; - getNodeTools.getCircleNodeForBoom(targetSet, 1); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AoeDamage(damage, count, target, range); - PolluteNodes(targetSet, Name.NodeColor.Black); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - } - yield return null; - } - - public IEnumerator HealAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet = getNodeTools.getAllBlackNodes(); - int num=targetSet.Count; - RecoverHp(num); - //PolluteNodes(targetSet, Name.NodeColor.White); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - RecoverHp(num); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - RecoverHp(num); - } - - yield return null; - } - - public IEnumerator AoeAction() - { - HashSet targetSet = getNodeTools.getAllBlackNodes(); - int num = targetSet.Count; - PolluteNodes(targetSet, Name.NodeColor.White); - AttackDamage(num, 1); - yield return null; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs.meta deleted file mode 100644 index 539bebe5..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Leviathan.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 21262ab61e9bd8b40bd294046db9360a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs deleted file mode 100644 index 806c2579..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class LivingArmor : Enemy -{ - - - public bool isDead=false; - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.shedding, 1); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_LivingArmor, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.pollution), 1.0f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Pollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode, " ", "附身旁边的怪物"); - break; - case EnemyAction_Pollution: - enemyNode.currentActionScript.SettleText(enemyNode, " ", "脚下+随机污染周围四格地块"); - break; - } - - } - private void Update() - { - - if (canPossession()) - { - enemyNode.currentActionScript = new EnemyAction_Spell(); - } - else - { - enemyNode.currentActionScript = new EnemyAction_Pollution(); - } - if (enemyNode != null && enemyNode.currentActionScript != null) - { - SettlePlannText(enemyNode.currentActionScript); - } - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - if (!tryPossession()) - { - switch (enemyAction) - { - case EnemyAction_Pollution: - yield return StartCoroutine(PollutionAction()); - break; - } - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Pollution: - canMove = true; - canAttack = false; - canAoe = false; - break; - } - } - - public bool tryPossession() - { - bool isSuccessful=false; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNode(targets, 1); - targets.Remove(currentNode); - foreach (MapUnity target in targets) - { - if (Name.NodeColor.EnemyColor.Contains(target.whoColour)&&target.enemyNode != null && target.enemyNode.enemyType == EnemyNode.EnemyType.enemy) - { - target.enemyNode.sufferAbnormalCondition(AbnormalCondition.shedding, 1); - target.enemyNode.sufferAbnormalCondition(AbnormalCondition.armor,(int)enemyNode.EnemyState.currentHP); - isDead=true; - Debug.Log("附身成功"); - isSuccessful= true; - return isSuccessful; - } - } - return isSuccessful; - - } - - public bool canPossession() - { - bool isSuccessful = false; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNode(targets, 1); - targets.Remove(currentNode); - foreach (MapUnity target in targets) - { - if (Name.NodeColor.EnemyColor.Contains(target.whoColour) && target.enemyNode != null && target.enemyNode.enemyType == EnemyNode.EnemyType.enemy) - { - Debug.Log("canPossession成功"); - isSuccessful = true; - return isSuccessful; - } - } - return isSuccessful; - - } - public IEnumerator PollutionAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet playerNode = new HashSet { GameManager.Instance.playerOn }; - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNode(targets, 1); - targets.Remove(currentNode); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - RandomPollute(targets, 4); - RandomPollute(new HashSet { currentNode }, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - RandomPollute(targets, 4); - RandomPollute(new HashSet { currentNode }, 1); - } - } - } - } - public override IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - if (isDead) - { - enemyNode.OnDeath(); - } - } -} - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs.meta deleted file mode 100644 index 6d52864e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/LivingArmor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49a5ae0879f192943b667cb4e3e95703 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs deleted file mode 100644 index 9cc553f9..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs +++ /dev/null @@ -1,231 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Pharmacist : Enemy -{ - - - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_Pharmacist, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shieldAndPollution), 0.5f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - if(enemyNode != null && enemyNode.currentActionScript!= null ) - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShootAndPollute: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyAction_ShieldAndPollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShootAndPollute: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - case EnemyAction_ShieldAndPollution: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(8, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - // Debug.Log("currentAction是:" + currentAction); - switch (currentAction) - { - case EnemyAction_ShootAndPollute: - // Debug.Log("技能文本1"); - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText, "造成" + attackText + "点伤害并将伤害作用范围内变为污染"); - break; - case EnemyAction_ShieldAndPollution: - //Debug.Log("技能文本2"); - //改变文本 - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "使生命最低的单位获得"+ enemyNode.currentActionScript.colA+"点护盾,并将其周围7格变为污染"); - break; - } - - } - public override void OnDeath() - { - RewardManager.Instance.AddRewardTips(RewardManager.RewardType.potion, MathTool.GetRandomElements(PotionManager.Instance.potionSet,1).ElementAt(0)); - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShootAndPollute: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_ShieldAndPollution: - canMove = false; - canAttack = false; - canAoe = false; - break; - } - } - - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_ShieldAndPollution: - yield return StartCoroutine(ShieldAction()); - break; - } - HashSet mapUnities = new HashSet(); - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - mapUnities.Add(EnemyManager.Instance.enemySpeedSortingList[i]); - } - HashSet target = new HashSet(); - target=MathTool.GetRandomElements(mapUnities, 1); - EnemyNode targetEnemy = target.FirstOrDefault(); - HashSet debuff = new HashSet(); - HashSet targetDebuff = new HashSet(); - foreach (KeyValuePair kvp in targetEnemy.EnemyState.abnormalCondition) - { - if (AbnormalCondition.enemyDebuffList.Contains(kvp.Key)) - { - if (targetEnemy != enemyNode) - { - debuff.Add(kvp.Key); - } - - } - } - foreach(string a in debuff) - { - Debug.Log("异常是"+a); - } - if (debuff.Count == 0) - { - Debug.Log("异常没有"); - yield break; - } - targetDebuff = MathTool.GetRandomElements(debuff, 1); - int count= targetEnemy.EnemyState.abnormalCondition[targetDebuff.FirstOrDefault()].value; - targetEnemy.EnemyState.abnormalCondition.Remove(targetDebuff.FirstOrDefault()); - MapUnity targetNode = getNodeTools.LocationToGetNode(targetEnemy.positionX, targetEnemy.positionY); - HashSet targetNodes = new HashSet { targetNode }; - getNodeTools.getCircleNode(targetNodes, 1); - RandomPollute(targetNodes, count); - - } - - - - - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targets = new HashSet { aimNode }; - getNodeTools.getCircleNode(targets, 1); - if (getNodeTools.canRemoteAttackAboutTwoNode(currentNode, aimNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - RandomPollute(targets, 7); - if (targets.Contains(GameManager.Instance.playerOn)) - { - AttackDamage(enemyNode.EnemyState.damage, 1); - } - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - if (getNodeTools.canRemoteAttackAboutTwoNode(currentNode, aimNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - RandomPollute(targets, 7); - if (targets.Contains(GameManager.Instance.playerOn)) - { - AttackDamage(enemyNode.EnemyState.damage, 1); - } - } - } - } - } - - public override IEnumerator ShieldAction() - { - int minHp = 100; - int index = 0; - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if ((int)EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.currentHP < minHp) - { - minHp = (int)EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.currentHP; - index = i; - } - } - EnemyManager.Instance.enemySpeedSortingList[index].EnemyState.shieldValue += EnemyManager.Instance.enemySpeedSortingList[index].ShieldCalculation(8); - MapUnity currentNode = getNodeTools.LocationToGetNode(EnemyManager.Instance.enemySpeedSortingList[index].positionX, EnemyManager.Instance.enemySpeedSortingList[index].positionY); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNode(targets, 1); - RandomPollute(targets, 7); - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs.meta deleted file mode 100644 index 7652df6b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pharmacist.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8248e9ba988c86f4a8b06d531db14fc8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs deleted file mode 100644 index ca55680a..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Pollutinel : Enemy -{ - public bool isSurveillance=false; - - private void Start() - { - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.deBuff), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shield), 0.4f); - - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_DeBuff: - enemyNode.currentActionScript.colA=1; - break; - case EnemyAction_Spell: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage,0.1f); - break; - case EnemyActionAction_Shield: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(11, 0.1f); - break; - } - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_DeBuff: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_Spell: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyActionAction_Shield: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_DeBuff: - enemyNode.currentActionScript.SettleText(enemyNode, "", "对玩家施加一层虚弱"); - break; - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode, "", "开启监视,对踏入自身2格范围内的敌人造成" + enemyNode.currentActionScript.colA + "点伤害"); - break; - case EnemyActionAction_Shield: - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(), "使全体友方获得" + enemyNode.currentActionScript.colA + "点护盾"); - break; - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_DeBuff: - yield return StartCoroutine(DebuffAction()); - break; - case EnemyAction_Spell: - yield return StartCoroutine(SurveillanceAction()); - break; - case EnemyActionAction_Shield: - yield return StartCoroutine(ShieldAction(enemyNode.currentActionScript.colA)); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_DeBuff: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_Spell: - canMove = true; - canAttack = false; - canAoe = false; - break; - case EnemyActionAction_Shield: - canMove = true; - canAttack = false; - canAoe = false; - break; - } - } - - public IEnumerator DebuffAction() - { - isSurveillance = false; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - } - } - - - yield return new WaitForSeconds(0.5f); - } - - public IEnumerator ShieldAction(int num) - { - isSurveillance = false; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.shieldValue+=num; - } - - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.shieldValue += num; - } - - - } - } - - public IEnumerator SurveillanceAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - isSurveillance = true; - - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - isSurveillance = true; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs.meta deleted file mode 100644 index 7a7741b2..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Pollutinel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f92956f3b7a193040a632c42c8e4a3a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs deleted file mode 100644 index 83baac99..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class PollutionSpreader : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_PollutionSpreader, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spellAndAttack), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.pollution), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.4f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - - private void Update() - { - if (enemyNode != null && enemyNode.currentActionScript != null) - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (currentNode.whoColour == Name.NodeColor.Black) - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - enemyNode.currentActionScript.colA = 3; - break; - case EnemyAction_Pollution: - enemyNode.currentActionScript.colA = 3; - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = 5; - enemyNode.currentActionScript.colB = 3; - break; - } - } - else - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - enemyNode.currentActionScript.colA = 2; - break; - case EnemyAction_Pollution: - enemyNode.currentActionScript.colA = 2; - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = 4; - enemyNode.currentActionScript.colB = 2; - break; - } - } - enemyNode.enemy.SettlePlannText(enemyNode.currentActionScript); - } - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyAction_Pollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyActionAction_Attack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - enemyNode.currentActionScript.colA = 2; - break; - case EnemyAction_Pollution: - enemyNode.currentActionScript.colA = 2; - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = 4; - enemyNode.currentActionScript.colB = 2; - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Attack: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText+"*"+ enemyNode.currentActionScript.colB.ToString(), "造成" + attackText + "*"+ enemyNode.currentActionScript.colB.ToString()+"点伤害"); - break; - case EnemyAction_Pollution: - enemyNode.currentActionScript.SettleText(enemyNode, "", "散播:随机选择"+ enemyNode.currentActionScript.colA.ToString()+"格污染地块使其扩散1范围"); - break; - case EnemyAction_SpellAndAttack: - enemyNode.currentActionScript.SettleText(enemyNode, "", "瞄准玩家周围"+ enemyNode.currentActionScript.colA.ToString()+"范围,造成当前污染地块数量的伤害"); - break; - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_SpellAndAttack: - yield return StartCoroutine(ThrowAttackAction(1)); - break; - case EnemyAction_Pollution: - yield return StartCoroutine(PolluteAction()); - break; - case EnemyActionAction_Attack: - yield return StartCoroutine(AttackAction()); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_SpellAndAttack: - canMove = false; - canAttack = false; - canAoe = true; - break; - case EnemyAction_Pollution: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - } - } - public IEnumerator AttackAction() - { - int count = 2; - int damage = enemyNode.EnemyState.damage; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (currentNode.whoColour == Name.NodeColor.Black) - { - count = 3; - damage = enemyNode.EnemyState.damage + 1; - } - //MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, enemyNode.currentActionScript.colB); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, enemyNode.currentActionScript.colB); - } - } - } - } - - public IEnumerator ThrowAttackAction(int count) - { - int range = 2; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (currentNode.whoColour == Name.NodeColor.Black) - { - range = 3; - } - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - //yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AoeDamage(getNodeTools.getNodesCount(Name.Color.Black), count, GameManager.Instance.playerOn, range); - } - yield return null; - } - - public IEnumerator PolluteAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - int selectNum = 2; - if (currentNode.whoColour==Name.NodeColor.Black) - { - selectNum = 3; - } - HashSet blackNodes = MathTool.GetRandomElements(getNodeTools.getAllBlackNodes(), selectNum); - foreach (MapUnity target in blackNodes) - { - SettlementManager.Instance.spreadColorToAround(1, target); - } - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs.meta deleted file mode 100644 index 0ab8ee57..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PollutionSpreader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 511961fdc4c1bd7468cbc9058643df11 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs deleted file mode 100644 index 97b9a33e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs +++ /dev/null @@ -1,172 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class PrismReflector : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_PrismReflector, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shieldAndPollution), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.5f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShieldAndPollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_Spell: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShieldAndPollution: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(10, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_ShieldAndPollution: - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "对生命值最低的单位施加"+ enemyNode.currentActionScript.colA + "点护盾并随机污染三格地块"); - break; - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode, "", "吸收随机1范围的玩家颜色地块"); - break; - - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_ShieldAndPollution: - yield return StartCoroutine(ShieldAction()); - break; - case EnemyAction_Spell: - yield return StartCoroutine(PolluteAction()); - break; - } - - } - - public override void GetAimTarget() - { - if (targets != null) - { - targets.Clear(); - } - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShieldAndPollution: - targets = MathTool.GetRandomElements(getNodeTools.getAllBlackNodes(), 3); - break; - case EnemyAction_Spell: - MapUnity currentNode = MathTool.GetRandomElements(getNodeTools.getAllNodes(), 1).ElementAt(0); - targets = new HashSet { currentNode }; - getNodeTools.getCircleNodeForBoom(targets, 1); - break; - } - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_ShieldAndPollution: - canMove = false; - canAttack = false; - canAoe = true; - break; - case EnemyAction_Spell: - canMove = false; - canAttack = false; - canAoe = true; - break; - } - } - public override void enemyTurnBegin() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (Name.NodeColor.PlayerColor.Contains(currentNode.whoColour)) - { - Debug.Log("whoColour是" + currentNode.whoColour); - AttackDamage(getNodeTools.getNodesCount(Name.intColorTostring(currentNode.whoColour)),1); - } - } - public override IEnumerator ShieldAction() - { - int minHp = 100; - int index = 0; - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if ((int)EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.currentHP < minHp) - { - minHp = (int)EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.currentHP; - index = i; - } - } - EnemyManager.Instance.enemySpeedSortingList[index].EnemyState.shieldValue += EnemyManager.Instance.enemySpeedSortingList[index].ShieldCalculation(enemyNode.currentActionScript.colA); - //HashSet targets = getNodeTools.getAllNotBlackNodes(); - RandomPollute(targets, 3); - yield return new WaitForSeconds(0.5f); - } - - public IEnumerator PolluteAction() - { - /*MapUnity currentNode = MathTool.GetRandomElements(getNodeTools.getAllNodes(), 1).ElementAt(0); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNodeForBoom(targets, 1);*/ - ClearNodes(targets); - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs.meta deleted file mode 100644 index 41f1bb30..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/PrismReflector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e87ed8c868c3a21429933f60a9e74e2d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs deleted file mode 100644 index 69cd7748..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class RatWarrior : Enemy -{ - - - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_RatWarrior, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.5f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyAction_Spell: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Attack: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA + (int)enemyNode.EnemyState.currentHP / 5).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText, "造成" + attackText + "点伤害并至多移动" + stepRangeText + "个格子。生命越低造成的伤害越低"); - break; - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode," ", "恢复周围两圈地块污染数量的生命值,并将被吸收的地块变为空白"); - break; - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_Spell: - yield return StartCoroutine(ShieldAction()); - break; - } - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_Spell: - canMove = false; - canAttack = false; - canAoe = false; - break; - } - } - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet playerNode = new HashSet {GameManager.Instance.playerOn }; - HashSet targets = new HashSet { currentNode}; - getNodeTools.getCircleNode(targets, 1); - targets.Remove(currentNode); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA + (int)enemyNode.EnemyState.currentHP/5, 1); - RandomPollute(playerNode, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage + (int)enemyNode.EnemyState.currentHP / 5, 1); - RandomPollute(playerNode, 1); - } - } - } - } - - public override IEnumerator ShieldAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNode(targets, 2); - int successNodeCount = 0; - Debug.Log("influencePreviewPool" + targets.Count); - foreach (MapUnity target in targets) - { - if (Name.NodeColor.EnemyColor.Contains(target.whoColour) ) - { - successNodeCount++; - target.switchColor(Name.NodeColor.White); - Debug.Log("successNodeCount是" + successNodeCount); - } - } - RecoverHp(successNodeCount); - yield return new WaitForSeconds(0.5f); - } - -} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs.meta deleted file mode 100644 index 341967b1..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/RatWarrior.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f17481a4de285184782a3ac46e64132e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs deleted file mode 100644 index f87af69f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs +++ /dev/null @@ -1,204 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class ReconnaissanceBee : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_ReconnaissanceBee, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.5f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyAction_ShootAndPollute: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.2f); - enemyNode.currentActionScript.colB = 2; - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Attack: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText+"*"+ enemyNode.currentActionScript.colB.ToString(), "造成" + attackText + "*2点伤害"); - break; - case EnemyAction_ShootAndPollute: - //改变文本 - enemyNode.currentActionScript.SettleText(enemyNode, "", "污染目标脚下1范围内的格子(除了自身)"); - break; - - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(PolluteAction()); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_ShootAndPollute: - canMove = true; - canAttack = true; - canAoe = false; - break; - } - } - - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 2); - if (currentNode.whoColour.Equals(Name.NodeColor.Black)) - { - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.disable,1); - } - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 2); - if (currentNode.whoColour.Equals(Name.NodeColor.Black)) - { - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.disable,1); - } - } - } - } - } - - public IEnumerator PolluteAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet = new HashSet(); - targetSet.Add(GameManager.Instance.playerOn); - getNodeTools.getCircleNodeForBoom(targetSet, 1); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - PolluteNodes(targetSet, Name.NodeColor.Black); - if (currentNode.whoColour.Equals(Name.NodeColor.Black)) - { - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.disable, 1); - } - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - PolluteNodes(targetSet, Name.NodeColor.Black); - if (currentNode.whoColour.Equals(Name.NodeColor.Black)) - { - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.disable, 1); - } - } - } - } - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs.meta deleted file mode 100644 index e4e444c5..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/ReconnaissanceBee.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2596169c1c20d8e459673838370fd0df -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs deleted file mode 100644 index c4772ac5..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using static Name; - -public class SoulMaker : Enemy -{ - - public bool isSpeedUp=false; - - public List enemyList = new List {Name.EnemyName.BoundSoul}; - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_SoulMaker, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.summon), 0.5f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Summon: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - case EnemyAction_Spell: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Spell: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(10, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_Summon: - Debug.Log("技能文本1"); - //改变文本 - enemyNode.currentActionScript.SettleText(enemyNode, " ", "召唤一个桎梏之魂"); - break ; - case EnemyAction_Spell: - Debug.Log("技能文本2"); - //改变文本 - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "全体敌人回复"+ enemyNode.currentActionScript.colA+"点生命"); - break; - - } - - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_Summon: - yield return StartCoroutine(SummonAction());//召唤 - break; - case EnemyAction_Spell: - yield return StartCoroutine(HeallAction());//回血 - break; - } - } - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Summon: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyAction_Spell: - canMove = true; - canAttack = false; - canAoe = false; - break; - } - } - - public IEnumerator HeallAction() - { - - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - EnemyManager.Instance.enemySpeedSortingList[i].enemy.RecoverHp(enemyNode.currentActionScript.colA); - isSpeedUp = false; - } - - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - EnemyManager.Instance.enemySpeedSortingList[i].enemy.RecoverHp(enemyNode.currentActionScript.colA); - isSpeedUp = false; - } - - - - } - } - - public IEnumerator SummonAction() - { - List enemyPrefabList = EnemyPool.getEnemyPrefab(enemyList); - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet allCanUseNode = getNodeTools.getAllCanUseNode(); - foreach (var enemyPrefab in enemyPrefabList) - { - Debug.Log("enemyPrefab成功"); - MapUnity currentMapUnity = allCanUseNode.ElementAt(Random.Range(0, allCanUseNode.Count)); - Debug.Log("Count成功="+ allCanUseNode.Count); - var currentEnemy = Instantiate(enemyPrefab, currentMapUnity.transform.position, enemyPrefab.transform.rotation); - EnemyNode enemynodeA = currentEnemy.GetComponent(); - enemynodeA.positionX = currentMapUnity.locationX; - enemynodeA.positionY = currentMapUnity.locationY; - enemynodeA.EnemyState.RandomHp(); - enemynodeA.StartPosition(); - allCanUseNode.Remove(currentMapUnity); - yield return null; - } - - } - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs.meta deleted file mode 100644 index e9bfc6de..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/SoulMaker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 468bb64092721f74492fdeaba2e02b04 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs deleted file mode 100644 index 316ef8a4..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using static EnemyNode; - -public class StonePillar : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_StonePillar, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.pollution), 1.0f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Pollution: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_Pollution: - enemyNode.currentActionScript.SettleText(enemyNode," ", "随机污染1范围区域"); - break; - } - - } - public override void OnDeath() - { - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if (EnemyManager.Instance.enemySpeedSortingList[i].enemyScript== EnemyScript.Leviathan) - { - if (EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.stoneSkin)) - { - EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.abnormalCondition[AbnormalCondition.stoneSkin].value--; - } - } - } - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_Pollution: - yield return StartCoroutine(PolluteAction()); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Pollution: - canMove = false; - canAttack = false; - canAoe = true; - break; - } - } - - - public override void GetAimTarget() - { - if (targets != null) - { - targets.Clear(); - } - switch (enemyNode.currentActionScript) - { - case EnemyAction_Pollution: - MapUnity currentNode = MathTool.GetRandomElements(getNodeTools.getAllNodes(), 1).ElementAt(0); - targets = new HashSet { currentNode }; - getNodeTools.getCircleNodeForBoom(targets, 1); - break; - } - Debug.Log("targets数量是" + targets.Count); - } - - - public IEnumerator PolluteAction() - { - /*MapUnity currentNode = MathTool.GetRandomElements(getNodeTools.getAllNodes(), 1).ElementAt(0); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNodeForBoom(targets, 1);*/ - PolluteNodes(targets,Name.NodeColor.Black); - yield return new WaitForSeconds(0.5f); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs.meta deleted file mode 100644 index 96594885..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/StonePillar.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c38e2ef7b95bf5f49bc8db89f6c65e2d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs deleted file mode 100644 index 46d5ebc3..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Unity.VisualScripting; -using UnityEngine; - -public class Thief : Enemy -{ - - public int aliveCount = 0; - public int stolenForgingPointCount = 0; - public int stolenMoney = 0; - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_Thief, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.7f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.spell), 0.3f); - //actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.sleep), 0.4f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyAction_ShootAndPollute: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyAction_Nothing: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - private void Update() - { - if (enemyNode != null && enemyNode.currentActionScript != null) - { - if (aliveCount >= 3) - { - enemyNode.currentActionScript = EnemyPlanUIManager.Instance.enemyPlanUIIconDictionary[EnemyPlanUIFunction.nothing].NewAction(); - enemyAction = EnemyPlanUIManager.Instance.enemyPlanUIIconDictionary[EnemyPlanUIFunction.nothing].NewAction(); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - } - SettlePlannText(enemyNode.currentActionScript); - } - - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyAction_Spell: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(12, 0.1f); - enemyNode.currentActionScript.colB = MathTool.RandomTarget(22, 0.1f); - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyAction_Spell: - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "瞬移至玩家周围随机一格,造成"+ enemyNode.currentActionScript.colA+"点伤害,偷取"+ enemyNode.currentActionScript.colB+"金币"); - break; - case EnemyActionAction_Attack: - enemyNode.currentActionScript.SettleText(enemyNode, enemyNode.currentActionScript.colA.ToString(), "造成" + enemyNode.currentActionScript.colA + "点伤害"); - break; - case EnemyAction_Nothing: - enemyNode.currentActionScript.SettleText(enemyNode, " ", "回合开始时撤离战场"); - break; - - } - - } - public override void enemyTurnEnd() - { - aliveCount++; - /*if(aliveCount == 4) - { - enemyNode.RunAway(); - }*/ - } - - public override void OnDeath() - { - if (stolenMoney != 0) - { - RewardManager.Instance.AddRewardTips(RewardManager.RewardType.money, stolenMoney.ToString()); - } - if (stolenForgingPointCount != 0) - { - RewardManager.Instance.AddRewardTips(RewardManager.RewardType.forgPoint, stolenForgingPointCount.ToString()); - } - } - - public override void enemyTurnBegin() - { - /*if (aliveCount >= 3) - { - enemyNode.RunAway(); - }*/ - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_Spell: - yield return StartCoroutine(TeleportAction(enemyNode.currentActionScript.colA, 1, enemyNode.currentActionScript.colB)); - break; - case EnemyAction_Nothing: - yield return StartCoroutine(RunAwayAction()); - break; - } - } - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyAction_Spell: - canMove = false; - canAttack = false; - canAoe = false; - break; - case EnemyAction_Nothing: - canMove = false; - canAttack = false; - canAoe = false; - break; - } - } - - public override IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet=new HashSet { GameManager.Instance.playerOn }; - getNodeTools.getCircleNodeForEnemy(targetSet, 1); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - if (currentNode.whoColour == Name.NodeColor.Black) - { - stolenForgingPointCount += stealForgingPoint(4); - } - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("MeleeAttack"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.currentActionScript.colA, 1); - if (currentNode.whoColour == Name.NodeColor.Black) - { - stolenForgingPointCount += stealForgingPoint(4); - } - } - } - } - } - - public IEnumerator TeleportAction(int damage,int damageCount,int stealMoneyCount) - { - - HashSet targets = new HashSet { GameManager.Instance.playerOn }; - getNodeTools.getCircleNodeForEnemy(targets, 1); - targets.Remove(GameManager.Instance.playerOn); - if (targets.Count > 0) - { - HashSet targetNode = MathTool.GetRandomElements(targets, 1); - yield return StartCoroutine(moveOneStep(targetNode.ElementAt(0))); - AttackDamage(damage, damageCount); - stolenMoney += stealMoney(stealMoneyCount); - } - yield return null; - } - - public IEnumerator RunAwayAction() - { - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - enemyNode.RunAway(); - yield return null; - } - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs.meta deleted file mode 100644 index ba157c29..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Thief.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 28e682bd65836a9418d4df1eb68a6062 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs deleted file mode 100644 index 66ba5f07..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Twinbee : Enemy -{ - - - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.Buff_Twinbee, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.aoe), 0.5f); - GameManager.Instance.PlayerMove += SettleRangeAttack; - } - - private void OnDestroy() - { - if (GameManager.Instance != null) - GameManager.Instance.PlayerMove -= SettleRangeAttack; - } - public override void SettleRangeAttack() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.enemyUIBar.outAttackRange.SetActive(!enemyNode.rangePool.Contains(GameManager.Instance.playerOn)); - break; - case EnemyActionAction_Aoe: - enemyNode.enemyUIBar.outAttackRange.SetActive(false); - break; - } - } - - public override void ActionValRandom() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(enemyNode.EnemyState.damage, 0.1f); - break; - case EnemyActionAction_Aoe: - enemyNode.currentActionScript.colA = MathTool.RandomTarget(24, 0.1f); - break; - } - } - public override void SettlePlannText(EnemyAction currentAction) - { - switch (currentAction) - { - case EnemyActionAction_Attack: - //改变文本 - string attackText = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - string stepRangeText = enemyNode.getStepRange().ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackText, "造成" + attackText + "点伤害并至多移动" + stepRangeText + "个格子"); - break; - case EnemyActionAction_Aoe: - string attackTextAoe = enemyNode.DamageCalculation(enemyNode.currentActionScript.colA).ToString(); - enemyNode.currentActionScript.SettleText(enemyNode, attackTextAoe, "以玩家为中心2格投射,造成" + attackTextAoe + "点伤害"); - break; - - } - - } - public override void enemyTurnEnd() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetSet = new HashSet(); - targetSet.Add(currentNode); - getNodeTools.getCircleNodeForBoom(targetSet, 1); - bool isBlack=false; - foreach (MapUnity target in targetSet) - { - if (target.whoColour.Equals(Name.NodeColor.Black)) - { - isBlack = true; - } - } - if (isBlack) - { - enemyNode.EnemyState.shieldValue += 8; - } - } - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyActionAction_Aoe: - yield return StartCoroutine(ThrowAttackAction(2, enemyNode.currentActionScript.colA, 1,aimNode)); - break; - } - - } - - public override void BoolCheck() - { - switch (enemyNode.currentActionScript) - { - case EnemyActionAction_Attack: - canMove = true; - canAttack = true; - canAoe = false; - break; - case EnemyActionAction_Aoe: - canMove = false; - canAttack = false; - canAoe = true; - break; - - } - } - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs.meta deleted file mode 100644 index 429257f9..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Twinbee.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5d00081902c808a43bb533b5bb7223e3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs deleted file mode 100644 index 8db8cbfa..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class AshBeetle : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.7f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.weak), 0.3f); - } - - private void Update() - { - - } - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_Weak: - yield return StartCoroutine(WeakAttackAction()); - break; - - } - } - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - } - } - - IEnumerator WeakAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - } - } - } - } - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Shoot(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkullGuardianMoveCoroutine(disNode)); - } - IEnumerator SkullGuardianMoveCoroutine( MapUnity endMapUnity )//移动到位置 - { - while ( true ) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if(dDistance < 0.1f) - { - break; - } - this.gameObject .transform .position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - public void NextTurnIntention() - { - - if (enemyNode.pasth.Count <= 1) - { - enemyNode.canMove = false; - } - else - { - enemyNode.canMove = true; - } - - if(enemyNode .EnemyState .currentSkillCoolDown <=0) - { - enemyNode.planAction = EnemyNode.PlanAction.sheield; - } - else - { - enemyNode.planAction = EnemyNode.PlanAction.attack; - enemyNode.canLineAppre = true; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage),enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs.meta deleted file mode 100644 index 96cedfb6..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/AshBeetle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 159aa5c40181a574ea93a2306670a2c8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs deleted file mode 100644 index 8685c56c..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class BlackSheep : Enemy -{ - - - - - - - - private void Start() - { - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.2f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.4f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attackAndShield), 0.4f); - } - - private void Update() - { - - } - - private void OnEnable() - { - - - } - - public override IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_AttackAndShield: - yield return StartCoroutine(ShieldAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(MeleeAttackAndPolluteAction()); - break; - } - - - - } - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs.meta deleted file mode 100644 index e44b2185..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlackSheep.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cff9b96bf0935a34e99e64276d588a22 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs deleted file mode 100644 index 7cea772e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs +++ /dev/null @@ -1,213 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class BlastFistMushroom : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - public int attackWaitCount = 0; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.nothing), 1.0f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyAction_Nothing(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - attackWaitCount++; - if (attackWaitCount == 3) - { - attackWaitCount = 0; - enemyAction = new EnemyActionAction_Attack(); - } - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - } - } - - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - int damage = GameManager.Instance.gerEnemytNodeCount(); - MathTool.keepNature(ref damage); - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs.meta deleted file mode 100644 index ffa0e45f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/BlastFistMushroom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 55c67188084c0884a843685cc2343e6e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs deleted file mode 100644 index f1ce3592..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Bone : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - - //怪物行动 - public EnemyAction enemyAction; - - public int reTurn = 0; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.nothing), 1.0f); - - if(enemyNode .enemyUIBar== null ) - { - enemyNode.CreatEnemyUIBar(enemyNode); - ChooseAction(); - - } - - } - - private void Update() - { - - } - - public void ChooseAction() - { - enemyAction = new EnemyAction_Nothing(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - reTurn += 1; - - if (reTurn == 2) - { - EnemyManager.Instance.enemyCount += 1; - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - enemyNode.boomAndPolluteCal(); - enemyNode.boneOnDeath(); - yield break; - } - } - - IEnumerator JudgNextActionCoroutine() - { - yield return StartCoroutine(JudgeActionCoroutine()); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - - - -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs.meta deleted file mode 100644 index 03c143dd..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Bone.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1127cf5fcca27ba4c9d86bf4d1bffce8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs deleted file mode 100644 index 8669a953..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs +++ /dev/null @@ -1,233 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class CorrosiveSludge : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.corrode, 1); - enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 8); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.aoe), 0.6f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.4f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Aoe: - yield return StartCoroutine(SkillAction()); - break; - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - - } - - - - } - - - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - enemyNode.CorrodeRealize(enemyNode.pasth[0]); - Debug.Log("FindPathTowardsPlayer成功"); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - Debug.Log("剩余步数还有"+ enemyNode.pasth.Count); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - Debug.Log("if成功"); - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - else - { - Debug.Log("else成功"); - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - } - } - - IEnumerator SkillAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - HashSet targetSet= new HashSet(); - targetSet.Add(currentNode); - getNodeTools.getCircleNode(targetSet,1); - getNodeTools.RandomPollute(targetSet,4); - foreach (MapUnity target in targetSet) - { - if (target.Equals(GameManager.Instance.playerOn)) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(8), enemyNode); - } - } - enemyNode.currentActionScript.FadeAttackRangeAll(enemyNode); - enemyNode.aoeRangePool.Clear(); - yield break; - - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs.meta deleted file mode 100644 index 8fb616fc..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/CorrosiveSludge.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 80ff1cf9bf5e8df42a81bfd4e085df46 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs deleted file mode 100644 index 1fb06e8e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs +++ /dev/null @@ -1,342 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class DarkCloud : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shoot), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shield), 0.2f); - enemyNode.sufferAbnormalCondition(AbnormalCondition.corrode, 1); - enemyNode.sufferAbnormalCondition(AbnormalCondition.boomAndPollute, 1); - } - - private void Update() - { - - } - - private void OnEnable() - { - - - } - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Shoot(); - Debug.Log("actionPool大小"+ actionPool.Count()); - if (enemyNode == null) - { - Debug.Log("enemyNode大小"); - } - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Shoot: - yield return StartCoroutine(RemoteAttackAction()); - break; - case EnemyActionAction_Shield: - yield return StartCoroutine(ShieldAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(RemoteAttackAndPolluteAction()); - break; - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - IEnumerator RemoteAttackAndPolluteAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = getNodeTools .LocationToGetNode (enemyNode.positionX, enemyNode.positionY ); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage); - GameManager.Instance.playerOn.switchColor(Name.NodeColor.Black); - - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - IEnumerator ShieldAction() - { - enemyNode.EnemyState.shieldValue += 3; - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targetNodes=new HashSet { currentNode }; - getNodeTools.getCircleNodeForEnemy(targetNodes,1); - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - foreach (MapUnity node in targetNodes) - { - node.switchColor(Name.NodeColor.Black); - } - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - } - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - transform.SetParent(disNode.CylinderFloor.transform); - - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - Debug.Log("开始"); - yield return StartCoroutine(JudgeActionCoroutine()); - } - Debug.Log("结束"); - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - Vector3 startPos = transform.position; - Vector3 endpos = new Vector3(endMapUnity.transform.position.x, transform.position.y, endMapUnity.transform.position.z); - Vector3 jumpCentre = new Vector3((startPos.x + endpos.x) / 2.0f, (startPos.y + endpos.y) / 2.0f + enemyNode.jumpHeight, (startPos.z + endpos.z) / 2.0f); - List linePath = new List(); - linePath = enemyNode. CalculatePath(linePath,enemyNode. posCount, startPos, jumpCentre, endpos); - bool move = true; - float time = 0; - Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); - - for (int posIndex = 0; posIndex < linePath.Count; posIndex++) - { - time = 0; - move = true; - while (move) - { - if (posIndex == linePath.Count - 1) - { - transform.position = Vector3.Lerp(linePath[posIndex], endpos, time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); - } - else - { - transform.position = Vector3.Lerp(linePath[posIndex], linePath[posIndex + 1], time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); //time += Time.deltaTime * speedCurve.Evaluate(posIndex+1 /posCount )); - } - - if (time >= 1) - { - move = false; - } - yield return null; - } - - } - - - - /* - - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - }*/ - transform.localPosition = new Vector3(0, 0, -0.1468f); - //声音 - AudioManager.Instance.EnemyMoveVoicePlayer(); - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage(int damage) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs.meta deleted file mode 100644 index 4bdfefe3..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DarkCloud.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 620ad3aeb3d0caf41b4b401901b81e66 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs deleted file mode 100644 index 04797bbc..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs +++ /dev/null @@ -1,212 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class DrowsyShroom : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.sleep), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.5f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyAction_Sleep: - yield return StartCoroutine(SleepAction()); - break; - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - - } - - - - } - - - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - } - } - - IEnumerator SleepAction() - { - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.levelSleep, 4); - yield break; - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs.meta deleted file mode 100644 index 34acd781..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/DrowsyShroom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5020a3e65f711024bbf871c4b7f33988 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs deleted file mode 100644 index 5d94c5a8..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs +++ /dev/null @@ -1,229 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class EmberWraith : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - enemyNode.sufferAbnormalCondition(AbnormalCondition.flashPoint, 1); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shield), 0.5f); - } - - private void Update() - { - - } - - private void OnEnable() - { - - - } - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyActionAction_Shield: - yield return StartCoroutine(ShieldAction()); - break; - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator ShieldAction() - { - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - EnemyManager.Instance.enemySpeedSortingList[i].sufferAbnormalCondition(AbnormalCondition.angerUpperDamage, 3); - EnemyManager.Instance.enemySpeedSortingList[i].EnemyState.shieldValue += EnemyManager.Instance.enemySpeedSortingList[i].ShieldCalculation(7); - } - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - } - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage(int damage) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs.meta deleted file mode 100644 index 3729b4d7..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EmberWraith.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7f71efaf8368f534ab344c5b2fd0e12d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs deleted file mode 100644 index 3583f982..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyName : MonoBehaviour -{ - - - public const string skullGuardian = "SkullGuardian"; - public const string skeletonArcher = "SkeletonArcher"; - public const string skullmage = "SkullMage"; - public const string ashBeetle = "AshBeetle"; - public const string hoodWanderer = "HoodWanderer"; - public const string skullWarlock = "SkullWarlock"; - public const string blastFistMushroom = "BlastFistMushroom"; - public const string shatteringFistMushroom = "ShatteringFistMushroom"; - public const string parasiticMushroom = "ParasiticMushroom"; - public const string emberWraith = "EmberWraith"; - public const string drowsyShroom = "DrowsyShroom"; - public const string bone = "Bone"; - public const string corrosiveSludge = "CorrosiveSludge"; -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs.meta deleted file mode 100644 index 7df9618b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/EnemyName.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b54737814f2e13f43b76a4f3f2ae304c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs deleted file mode 100644 index 83bfc399..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs +++ /dev/null @@ -1,351 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Grinfiend : MonoBehaviour -{ - public EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shoot), 0.2f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.deBuff), 0.8f); - } - - private void Update() - { - - } - - private void OnEnable() - { - - - } - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Shoot(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Shoot: - yield return StartCoroutine(RemoteAttackAction()); - break; - case EnemyActionAction_DeBuff: - yield return StartCoroutine(DebuffAction()); - break; - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - IEnumerator RemoteAttackAndPolluteAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - if (GameManager.Instance.playerOn.unitPool[1] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[1]; - mapUnityA.switchColor(Name.NodeColor.Black); - } - if (GameManager.Instance.playerOn.unitPool[5] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[5]; - mapUnityA.switchColor(Name.NodeColor.Black); - } - - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - public string GetRandomAction(Dictionary actions) - { - System.Random random = new System.Random(); - double randValue = random.NextDouble(); // 生成一个 [0, 1) 之间的随机数 - double cumulative = 0.0; - - foreach (var action in actions) - { - cumulative += action.Value; - if (randValue < cumulative) - { - return action.Key; - } - } - return null; // 如果没有匹配到,则返回 null(理论上不会出现此情况) - } - IEnumerator DebuffAction() - { - Dictionary debuffPool = new Dictionary() - { - {"para", 0.2 }, - {"weak", 0.4 }, - {"vulnerable", 0.4 } - }; - - string action = GetRandomAction(debuffPool); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - switch (action) - { - case "para": - Debug.Log("寄生:"); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.parasitism, 1); - break; - case "weak": - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.addDrawCard, -1); - break; - case "vulnerable": - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.vulnerable, 1); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.downSpeed, 1); - break; - - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - } - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - transform.SetParent(disNode.CylinderFloor.transform); - - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - Vector3 startPos = transform.position; - Vector3 endpos = new Vector3(endMapUnity.transform.position.x, transform.position.y, endMapUnity.transform.position.z); - Vector3 jumpCentre = new Vector3((startPos.x + endpos.x) / 2.0f, (startPos.y + endpos.y) / 2.0f + enemyNode.jumpHeight, (startPos.z + endpos.z) / 2.0f); - List linePath = new List(); - linePath = enemyNode.CalculatePath(linePath, enemyNode.posCount, startPos, jumpCentre, endpos); - bool move = true; - float time = 0; - Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); - - for (int posIndex = 0; posIndex < linePath.Count; posIndex++) - { - time = 0; - move = true; - while (move) - { - if (posIndex == linePath.Count - 1) - { - transform.position = Vector3.Lerp(linePath[posIndex], endpos, time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); - } - else - { - transform.position = Vector3.Lerp(linePath[posIndex], linePath[posIndex + 1], time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); //time += Time.deltaTime * speedCurve.Evaluate(posIndex+1 /posCount )); - } - - if (time >= 1) - { - move = false; - } - yield return null; - } - - } - transform.localPosition = new Vector3(0, 0, -0.1468f); - //声音 - AudioManager.Instance.EnemyMoveVoicePlayer(); - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage(int damage) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs.meta deleted file mode 100644 index fe77b5ea..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Grinfiend.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d18a1c278edb3e04e865dd3b52d63e2f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs deleted file mode 100644 index a993ecf7..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs +++ /dev/null @@ -1,260 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class HoodWanderer : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shoot), 0.3f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.4f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shield), 0.3f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Shoot(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Shoot: - yield return StartCoroutine(RemoteAttackAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(shootAndPolluteAction()); - break; - case EnemyActionAction_Shield: - yield return StartCoroutine(shieldAction()); - break; - - } - - - - } - - IEnumerator shootAndPolluteAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - RandomPollute(getNodeTools.getAllPlayerNodes(), 3); - } - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - RandomPollute(getNodeTools.getAllPlayerNodes(), 3); - } - } - } - } - - IEnumerator shieldAction() - { - enemyNode.sufferAbnormalCondition(AbnormalCondition.angerUpperDamage,3); - enemyNode.EnemyState.shieldValue += enemyNode.ShieldCalculation(5); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - - } - } - - public void RandomPollute(HashSet set, int num) - { - HashSet randomNodes = MathTool.GetRandomElements(set, num); - foreach (var node in randomNodes) - { - node.switchColor(Name.NodeColor.Black); - } - GameManager.Instance.SyncColourCountUI(); - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if(enemyNode.getStepRange() + 1<= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage),enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs.meta deleted file mode 100644 index d8e64739..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/HoodWanderer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2ee44fd1623e33f47a6ee9994ba818c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs deleted file mode 100644 index 3ccb1202..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs +++ /dev/null @@ -1,418 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Mushroom : MonoBehaviour -{ - public EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.2f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.aoe), 0.4f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.weak), 0.2f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.deBuff), 0.2f); - } - - private void Update() - { - - } - - private void OnEnable() - { - - - } - public void enemyTurn() - { - - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_Weak: - yield return StartCoroutine(MeleeAttackAndWeakAction()); - break; - case EnemyActionAction_Aoe: - yield return StartCoroutine(SkillAction()); - break; - case EnemyActionAction_DeBuff: - yield return StartCoroutine(MeleeAttackAndDebuffAction()); - break; - } - - - - } - - IEnumerator SkillAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - HashSet targetNodes = new HashSet { currentNode }; - getNodeTools.getCircleNode(targetNodes, 1); - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - foreach (MapUnity node in targetNodes) - { - node.switchColor(Name.NodeColor.Black); - if (node.Equals(GameManager.Instance.playerOn)) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(7), enemyNode); - } - } - enemyNode.currentActionScript.FadeAttackRangeAll(enemyNode); - enemyNode.aoeRangePool.Clear(); - yield break; - - } - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - //enemyNode.anim.SetTrigger("Action"); - //yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator MeleeAttackAndWeakAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - //enemyNode.anim.SetTrigger("Action"); - //yield return new WaitForSeconds(0.5f); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.weak, 1); - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator MeleeAttackAndDebuffAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.downSpeed, 1); - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.downSpeed, 1); - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - IEnumerator RemoteAttackAndPolluteAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - if (GameManager.Instance.playerOn.unitPool[1] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[1]; - mapUnityA.switchColor(Name.NodeColor.Black); - } - if (GameManager.Instance.playerOn.unitPool[5] != null) - { - MapUnity mapUnityA = GameManager.Instance.playerOn.unitPool[5]; - mapUnityA.switchColor(Name.NodeColor.Black); - } - - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - IEnumerator ShieldAction() - { - enemyNode.EnemyState.shieldValue += 5; - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - transform.SetParent(disNode.CylinderFloor.transform); - - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - Vector3 startPos = transform.position; - Vector3 endpos = new Vector3(endMapUnity.transform.position.x, transform.position.y, endMapUnity.transform.position.z); - Vector3 jumpCentre = new Vector3((startPos.x + endpos.x) / 2.0f, (startPos.y + endpos.y) / 2.0f + enemyNode.jumpHeight, (startPos.z + endpos.z) / 2.0f); - List linePath = new List(); - linePath = enemyNode.CalculatePath(linePath, enemyNode.posCount, startPos, jumpCentre, endpos); - bool move = true; - float time = 0; - Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); - - for (int posIndex = 0; posIndex < linePath.Count; posIndex++) - { - time = 0; - move = true; - while (move) - { - if (posIndex == linePath.Count - 1) - { - transform.position = Vector3.Lerp(linePath[posIndex], endpos, time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); - } - else - { - transform.position = Vector3.Lerp(linePath[posIndex], linePath[posIndex + 1], time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); //time += Time.deltaTime * speedCurve.Evaluate(posIndex+1 /posCount )); - } - - if (time >= 1) - { - move = false; - } - yield return null; - } - - } - transform.localPosition = new Vector3(0, 0, -0.1468f); - //声音 - AudioManager.Instance.EnemyMoveVoicePlayer(); - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage(int damage) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs.meta deleted file mode 100644 index b54a1865..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Mushroom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: da70d494672e9b742b621a143865cad7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs deleted file mode 100644 index f7150843..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs +++ /dev/null @@ -1,264 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class ParasiticMushroom : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.4f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.deBuff), 0.4f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attackAndShield), 0.2f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyActionAction_DeBuff: - yield return StartCoroutine(MeleeAttackAndParasitism()); - break; - case EnemyAction_AttackAndShield: - yield return StartCoroutine(MeleeAttackAndShield()); - break; - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator MeleeAttackAndParasitism() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.parasitism, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.parasitism, 1); - } - } - } - } - - IEnumerator MeleeAttackAndShield() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(8); - enemyNode.EnemyState.shieldValue += enemyNode.ShieldCalculation(7); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(8); - enemyNode.EnemyState.shieldValue += enemyNode.ShieldCalculation(7); - } - } - } - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage(int damage) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs.meta deleted file mode 100644 index bfaee045..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ParasiticMushroom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bda1c3f001b47d74f86c660612824f66 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs deleted file mode 100644 index 2b3cfe7f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs +++ /dev/null @@ -1,356 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using static Name; - -public class Polymaw : MonoBehaviour -{ - public EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.aoe), 0.2f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.25f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attackAndShield), 0.25f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.3f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Aoe: - yield return StartCoroutine(SkillAction()); - break; - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyAction_AttackAndShield: - yield return StartCoroutine(MeleeAttackAndShieldAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(MeleeAttackAndPolluteAction()); - break; - - } - - - - } - - - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - enemyNode.CorrodeRealize(enemyNode.pasth[0]); - Debug.Log("FindPathTowardsPlayer成功"); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - //声音 - // AudioManager.Instance.EnemyMoveVoicePlayer(); - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - transform.SetParent(disNode.CylinderFloor.transform); - - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - Debug.Log("if成功"); - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(); - } - } - else - { - Debug.Log("else成功"); - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(); - } - } - } - } - - IEnumerator MeleeAttackAndPolluteAction() - { - MapUnity currentNode = GameManager.Instance.playerOn; - MapUnity enemyOn = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - HashSet targetNodes = new HashSet { currentNode }; - getNodeTools.getCircleNode(targetNodes, 1); - - if (getNodeTools.canRemoteAttack(enemyOn, enemyNode.EnemyState.attackRange)) - { - Debug.Log("if成功"); - Debug.Log("attackRange是"+ enemyNode.EnemyState.attackRange); - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(); - foreach (MapUnity node in targetNodes) - { - node.switchColor(Name.NodeColor.Black); - } - } - } - else - { - Debug.Log("else成功"); - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(enemyOn, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(); - foreach (MapUnity node in targetNodes) - { - node.switchColor(Name.NodeColor.Black); - } - } - } - } - } - IEnumerator MeleeAttackAndShieldAction() - { - enemyNode.EnemyState.shieldValue += 4; - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - Debug.Log("if成功"); - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(); - - } - } - else - { - Debug.Log("else成功"); - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - yield return StartCoroutine(enemyNode.MeleeAttackAim()); - // enemyNode.anim.SetTrigger("Action"); - // yield return new WaitForSeconds(0.5f); - AttackDamage(); - } - } - } - } - - IEnumerator SkillAction() - { - enemyNode.EnemyState.abnormalCondition.Clear(); - GameManager.Instance.SyncColourCountUI(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - HashSet targetNodes = new HashSet { currentNode }; - getNodeTools.getCircleNode(targetNodes, 2); - enemyNode.anim.SetTrigger("Action"); - yield return new WaitForSeconds(0.5f); - foreach (MapUnity node in targetNodes) - { - node.switchColor(Name.NodeColor.Black); - if (node.Equals(GameManager.Instance.playerOn)) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(5), enemyNode); - } - } - enemyNode.currentActionScript.FadeAttackRangeAll(enemyNode); - enemyNode.aoeRangePool.Clear(); - yield break; - - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - Vector3 startPos = transform.position; - Vector3 endpos = new Vector3(endMapUnity.transform.position.x, transform.position.y, endMapUnity.transform.position.z); - Vector3 jumpCentre = new Vector3((startPos.x + endpos.x) / 2.0f, (startPos.y + endpos.y) / 2.0f + enemyNode.jumpHeight, (startPos.z + endpos.z) / 2.0f); - List linePath = new List(); - linePath = enemyNode.CalculatePath(linePath, enemyNode.posCount, startPos, jumpCentre, endpos); - bool move = true; - float time = 0; - Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); - - for (int posIndex = 0; posIndex < linePath.Count; posIndex++) - { - time = 0; - move = true; - while (move) - { - if (posIndex == linePath.Count - 1) - { - transform.position = Vector3.Lerp(linePath[posIndex], endpos, time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); - } - else - { - transform.position = Vector3.Lerp(linePath[posIndex], linePath[posIndex + 1], time += Time.deltaTime * enemyNode.speedCurve.Evaluate(posIndex / enemyNode.posCount) * enemyNode.jumpSpeed); //time += Time.deltaTime * speedCurve.Evaluate(posIndex+1 /posCount )); - } - - if (time >= 1) - { - move = false; - } - yield return null; - } - - } - transform.localPosition = new Vector3(0, 0, -0.1468f); - //声音 - AudioManager.Instance.EnemyMoveVoicePlayer(); - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs.meta deleted file mode 100644 index afb7e0dd..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Polymaw.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 441ffc4abe92e93468e7d196c1d2417f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs deleted file mode 100644 index f681081e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Reward : MonoBehaviour -{ - bool dir; - public float high = 0.25f; - public float speed; - public GameObject ball; - private void Update() - { if (dir) - { - ball.transform.position -= new Vector3(0, Time.deltaTime*speed , 0); - high -= Time.deltaTime*speed ; - if(high <=0) - { - dir = !dir; - } - } - else - { - ball.transform.position += new Vector3(0, Time.deltaTime * speed, 0); - high += Time.deltaTime * speed; - if (high >= 0.25f) - { - dir = !dir; - } - } - - } - private void OnTriggerEnter(Collider other) - { - Debug.Log(other.gameObject.name); - if(other .transform .tag =="Player") - { - //获得奖励 - Destroy(this.gameObject); - } - else if(other.transform.tag == "Enemy") - { - //销毁 - Destroy(this.gameObject); - } - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs.meta deleted file mode 100644 index f1eaab0e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/Reward.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49294eba6c5749246bee238ab04fc23c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs deleted file mode 100644 index 2cf70c45..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs +++ /dev/null @@ -1,268 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class ShatteringFistMushroom : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.deBuff), 0.25f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.deBuff), 0.25f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - case EnemyActionAction_DeBuff: - if(Random.Range(0, 2)>0) - { - yield return StartCoroutine(MeleeAttackAndBanStepAction()); - } - else - { - yield return StartCoroutine(MeleeAttackAndVulnerableAction()); - } - break; - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - } - } - } - } - - IEnumerator MeleeAttackAndBanStepAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(enemyNode.EnemyState.damage); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - } - } - } - } - - IEnumerator MeleeAttackAndVulnerableAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(7); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.vulnerable, 1); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(7); - Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.vulnerable, 1); - } - } - } - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage(int damage) - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs.meta deleted file mode 100644 index 9b5c09b8..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/ShatteringFistMushroom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a9cfb911258ed7d4a80872da17003456 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs deleted file mode 100644 index 1db7f610..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class SkullGuardian : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.attack), 1.0f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Attack(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Attack: - yield return StartCoroutine(MeleeAttackAction()); - break; - - } - - - - } - - IEnumerator MeleeAttackAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - yield return new WaitForSeconds(1); - currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - } - } - } - - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if(enemyNode.getStepRange() + 1<= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - transform.SetParent(disNode.CylinderFloor.transform); - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)|| enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.coma)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - Debug.Log("4+46+54"); - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - public void ArcherColour(MapUnity currentNode) - { - List toColourPool = new List(); - - if (currentNode.blocked == false) - toColourPool.Add(currentNode); - - for (int i = 0; i < currentNode.unitPool.Count; i++) - { - if (currentNode.unitPool[i] != null && currentNode.unitPool[i].blocked == false) - { - toColourPool.Add(currentNode.unitPool[i]); - } - } - - for (int c = 0; c < toColourPool.Count; c++) - { - if (toColourPool.Count > 0) - { - toColourPool[c].switchColor(Name.NodeColor.Black); ; - if(toColourPool[c].playerOn) - { - AttackDamage(); - } - } - } - } - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage),enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs.meta deleted file mode 100644 index fdd9711e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullGuardian.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a948ef3ecbf4ce4bb3cc1cb6d93526b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs deleted file mode 100644 index b58289ae..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs +++ /dev/null @@ -1,268 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class SkullMage : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shoot), 0.2f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shootAndPollute), 0.8f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Shoot(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Shoot: - yield return StartCoroutine(RemoteAttackAction()); - break; - case EnemyAction_ShootAndPollute: - yield return StartCoroutine(shootAndPolluteAction()); - break; - - } - - - - } - - IEnumerator shootAndPolluteAction() - { - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - RandomPollute(getNodeTools.getAllPlayerNodes(), 4); - } - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - RandomPollute(getNodeTools.getAllPlayerNodes(), 4); - } - } - } - } - - - public void RandomPollute(HashSet set, int num) - { - HashSet randomNodes = MathTool.GetRandomElements(set, num); - foreach (var node in randomNodes) - { - node.switchColor(Name.NodeColor.Black); - } - GameManager.Instance.SyncColourCountUI(); - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - public void ArcherColour(MapUnity currentNode) - { - List toColourPool = new List(); - - if (currentNode.blocked == false) - toColourPool.Add(currentNode); - - for (int i = 0; i < currentNode.unitPool.Count; i++) - { - if (currentNode.unitPool[i] != null && currentNode.unitPool[i].blocked == false) - { - toColourPool.Add(currentNode.unitPool[i]); - } - } - - for (int c = 0; c < toColourPool.Count; c++) - { - if (toColourPool.Count > 0) - { - toColourPool[c].switchColor(Name.NodeColor.Black); - if (toColourPool[c].playerOn) - { - AttackDamage(); - } - } - } - } - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs.meta deleted file mode 100644 index 6fc5e7eb..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullMage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6c4186aa69e2c5b488336a9cb2d98064 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs deleted file mode 100644 index 4742e8fb..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs +++ /dev/null @@ -1,258 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class SkullWarlock : MonoBehaviour -{ - EnemyNode enemyNode; - - [Header("瞄准射线图层剔除")] - public LayerMask layerMask; - - [Header("计数标量")] - public float time; - float lastTime = 0; - [Header("移动速度标量")] - public float moveSpeed; - //怪物行动 - public EnemyAction enemyAction; - - public Dictionary actionPool = new Dictionary(); - - private void Start() - { - enemyNode = GetComponent(); - - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shoot), 0.5f); - actionPool.Add(EnemyPlanUIManager.Instance.NewAction(EnemyPlanUIFunction.shield), 0.5f); - } - - private void Update() - { - - - } - - public void enemyTurn() - { - StartCoroutine(JudgNextActionCoroutine()); - - } - - public void ChooseAction() - { - enemyAction = new EnemyActionAction_Shoot(); - enemyAction = enemyNode.GetRandomAction(actionPool); - Debug.Log("行动是:" + enemyAction); - enemyNode.enemyUIBar.SwitchIntention(enemyAction); - - } - - - - IEnumerator JudgeActionCoroutine()//等移动到位置就判断是否还能走 - { - Debug.Log("真正行动是:" + enemyAction); - switch (enemyAction) - { - case EnemyActionAction_Shoot: - yield return StartCoroutine(RemoteAttackAction()); - break; - case EnemyActionAction_Shield: - yield return StartCoroutine(shieldAndPolluteAction()); - break; - - } - - - - } - - - IEnumerator shieldAndPolluteAction() - { - enemyNode.EnemyState.shieldValue += enemyNode.ShieldCalculation(5); - RandomPollute(getNodeTools.getAllPlayerNodes(), 4); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - - } - } - - - public void RandomPollute(HashSet set, int num) - { - HashSet randomNodes = MathTool.GetRandomElements(set, num); - foreach (var node in randomNodes) - { - node.switchColor(Name.NodeColor.Black); - } - GameManager.Instance.SyncColourCountUI(); - } - - - IEnumerator moveTowardsPlayer() - { - enemyNode.FindPathTowardsPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - IEnumerator moveAwayFromPlayer() - { - enemyNode.FindPathAwayFromPlayer(); - for (int i = 1; i < getMoveStep(); i++) - { - if (enemyNode.pasth.Count > 1) - { - yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); - } - } - } - - private int getMoveStep() - { - if (enemyNode.getStepRange() + 1 <= enemyNode.pasth.Count) - { - return enemyNode.getStepRange() + 1; - } - else - { - return enemyNode.pasth.Count; - } - } - - IEnumerator moveOneStep(MapUnity nexMapUnity) - { - enemyNode.bleedCal(); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - MapUnity disNode = nexMapUnity; - currentNode.blocked = false; - currentNode.enemyNode = null; - enemyNode.positionX = disNode.locationX; - enemyNode.positionY = disNode.locationY; - disNode.enemyNode = enemyNode; - yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); - } - - IEnumerator RemoteAttackAction() - { - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.immunity, 1); - //Usermanager.Instance.SufferPlayerAbnormalCondition(AbnormalCondition.banStep, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.immunity, 1); - //enemyNode.sufferAbnormalCondition(AbnormalCondition.boom, 1); - MapUnity currentNode = GameManager.Instance.X[enemyNode.positionX].Y[enemyNode.positionY]; - if (getNodeTools.canRemoteAttack(currentNode, enemyNode.EnemyState.attackRange)) - { - if (!enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.disarm)) - { - AttackDamage(); - } - - yield return new WaitForSeconds(1); - yield return StartCoroutine(moveAwayFromPlayer()); - } - else - { - yield return StartCoroutine(moveTowardsPlayer()); - } - } - - - - IEnumerator JudgNextActionCoroutine() - { - if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.sleep)) - { - - } - else - { - yield return StartCoroutine(JudgeActionCoroutine()); - } - //下回合意图 - ArcherAim(); - - //让下一个敌人运动 - EnemyManager.Instance.enemyTurnState = EnemyManager.EnemyTurnState.runing; - } - IEnumerator SkeletonArcherMoveCoroutine(MapUnity endMapUnity)//移动到位置 - { - while (true) - { - float dDistance = Vector3.Distance(this.gameObject.transform.position, endMapUnity.transform.position); - - if (dDistance < 0.1f) - { - break; - } - this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position, endMapUnity.transform.position, Time.deltaTime * moveSpeed); - - yield return 0; - } - - //判断腐蚀 - enemyNode.CorrodeRealize(endMapUnity); - //判断流血 - enemyNode.bleedRealize(); - yield break; - } - - - - public void ArcherColour(MapUnity currentNode) - { - List toColourPool = new List(); - - if (currentNode.blocked == false) - toColourPool.Add(currentNode); - - for (int i = 0; i < currentNode.unitPool.Count; i++) - { - if (currentNode.unitPool[i] != null && currentNode.unitPool[i].blocked == false) - { - toColourPool.Add(currentNode.unitPool[i]); - } - } - - for (int c = 0; c < toColourPool.Count; c++) - { - if (toColourPool.Count > 0) - { - toColourPool[c].switchColor(Name.NodeColor.Black); - if (toColourPool[c].playerOn) - { - AttackDamage(); - } - } - } - } - - public void ArcherAim() - { - Vector3 dir = GameManager.Instance.player.transform.position - this.transform.position; - Ray ray = new Ray(this.transform.position, dir); - if (Physics.Raycast(ray, out RaycastHit raycastHit, 500, layerMask.value)) - { - enemyNode.lineAim.GetComponent().aimGamgObject = raycastHit.collider.gameObject; - } - - } - - public void AttackDamage() - { - Usermanager.Instance.SufferDamage(enemyNode.DamageCalculation(enemyNode.EnemyState.damage), enemyNode); - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs.meta deleted file mode 100644 index 7cdc08d8..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/V0.1/SkullWarlock.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e038ef7935f7ddf4397b3ea4ec19e4f2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction.meta deleted file mode 100644 index fcb268a8..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 69e569b354e4a7b499f40c12d2e23255 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs deleted file mode 100644 index 5e274d88..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyAction -{ - public Sprite sprite; - public bool isAiming =true ;//是否需要连线 - public int colA; - public int colB; - public virtual void SettleText(EnemyNode enemyNode ,string damageValue,string planInforText) - { - // Debug.Log("基本"); - //attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - // enemyNode.stateText = "这个敌人将会造成" + attackDamageText.text + "点伤害。" + "这个敌人将会移动" + (enemyNode.getStepRange()).ToString() + "个格子。"; - - // Debug.Log("伤害数值"); - enemyNode.enemyUIBar.attackDamageText.text = damageValue; - - // Debug.Log("意图描述"); - if (planInforText == null) - { - enemyNode.stateText = " "; - } - else - { - enemyNode.stateText = planInforText; - } - } - - public virtual EnemyAction NewAction() - { - return null ; - } - - //用继承在子脚本中调用不同的遍历方法 - public virtual void AttackRange(EnemyNode enemyNode) - { - - } - public virtual void ShowAttackRange(EnemyNode enemyNode) - { - //遍历影响池变色 - if (enemyNode.rangePool!= null ) - { - HashSet hashPool = enemyNode.rangePool.ToHashSet(); - foreach (var mapNode in enemyNode.rangePool) - { - mapNode.EnemyInfluenced(hashPool); - mapNode.enemyInfMark.GetComponent().material = mapNode.enemyMark; - } - foreach (var mapNode in enemyNode.aoeRangePool) - { - mapNode.aoeInfluenced = true; - } - } - - } - public virtual void ShowAttackRangeAoe(EnemyNode enemyNode) - { - //遍历影响池变色 - foreach (var mapNode in enemyNode.aoeRangePool) - { - mapNode.aoeInfluenced = true; - } - } - public virtual void FadeAttackRange(EnemyNode enemyNode) - { - //遍历影响池变色 - for (int i = 0; i < enemyNode.rangePool.Count; i++) - { - enemyNode.rangePool[i].markInfluenced = false; - } - foreach (var mapNode in enemyNode.attackRangePool) - { - mapNode.markInfluenced = false; - } - foreach (var mapNode in enemyNode.moveRangePool) - { - mapNode.markInfluenced = false; - } - foreach (var mapNode in enemyNode.enemy.targets) - { - mapNode.markInfluenced = false; - } - } - public virtual void FadeAttackRangeAll(EnemyNode enemyNode) - { - //遍历影响池变色 - for (int i = 0; i < enemyNode.rangePool.Count; i++) - { - enemyNode.rangePool[i].markInfluenced = false; - } - for (int i = 0; i < enemyNode.aoeRangePool.Count; i++) - { - enemyNode .aoeRangePool[i].aoeInfluenced = false; - } - - } - //范围遍历方法 - //通用普攻 - public virtual void GeneralAttackRange(EnemyNode enemyNode) - { - EnemyManager.Instance.AttackRangeInfluencedNode(getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY), enemyNode.EnemyState .attackRange , enemyNode.rangePool); - } - //近战 - public virtual void MeleeAttackRange(EnemyNode enemyNode) - { - - EnemyManager.Instance.AttackRangeInfluencedNode(getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY), enemyNode.getStepRange()+1, enemyNode.rangePool); - } - //远程-攻击范围 - public virtual void ShootAttackRange(EnemyNode enemyNode) - { - Debug.Log("shoot"); - - EnemyManager.Instance.AttackRangeInfluencedNode(getNodeTools.LocationToGetNode(enemyNode.positionX,enemyNode.positionY), enemyNode.EnemyState.attackRange, enemyNode.rangePool); - } - //范围-作用范围 - public virtual void AoeAttackRange(EnemyNode enemyNode) - { - Debug.Log("aoe"); - //几-几 - EnemyManager.Instance.AttackRangeInfluencedNode(getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY), enemyNode.EnemyState.attackRange, enemyNode.rangePool); - EnemyManager.Instance.AttackRangeInfluencedNode(getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY), enemyNode.EnemyState.aoeRange, enemyNode.aoeRangePool); - ShowAttackRangeAoe(enemyNode); - } - //魔法 - public virtual void MagicAttackRange(EnemyNode enemyNode) - { - - } - //无范围 - public virtual void NoneAttackRange(EnemyNode enemyNode) - { - - } - //冲刺范围 - public virtual void DashAttackRange(EnemyNode enemyNode) - { - - } - //全图 - public virtual void AllMapAttackRange(EnemyNode enemyNode) - { - - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs.meta deleted file mode 100644 index db0bf6ad..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e8075ba039f880b42897ab752805d51c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs deleted file mode 100644 index 4fbf1162..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -public class EnemyActionAction_Aoe : EnemyAction -{ - /*public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - enemyNode.stateText = "这个敌人将会造成" + attackDamageText.text + "点范围伤害。"; - }*/ - public override void AttackRange(EnemyNode enemyNode) - { - AoeAttackRange(enemyNode); - } - - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_Aoe(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs.meta deleted file mode 100644 index 38771a1f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Aoe.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 163b4fa2863b1f94c89ba3a80e5143e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs deleted file mode 100644 index b6a3eaf9..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyActionAction_Attack : EnemyAction -{ - - public override void AttackRange(EnemyNode enemyNode) - { - MeleeAttackRange(enemyNode); - } - - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_Attack(); - action.sprite = this.sprite; - action.isAiming = true; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs.meta deleted file mode 100644 index 832dfff0..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Attack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f7e85a08c89e5f24c84bada0bf593f3c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs deleted file mode 100644 index 108dc0ac..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyActionAction_DeBuff : EnemyAction -{ - /* public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - attackDamageText.text = ""; - enemyNode.stateText = "这个敌人将施加负面效果"; - }*/ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_DeBuff(); - action.sprite = this.sprite; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs.meta deleted file mode 100644 index 5627e84f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_DeBuff.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dfc1ca1d11237ba439de83e421f9bb55 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs deleted file mode 100644 index 302a33ab..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyActionAction_Random : EnemyAction -{ - /* public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - - attackDamageText.text = ""; - enemyNode.stateText = "这个敌人的行动无法预测"; - }*/ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_Random(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs.meta deleted file mode 100644 index 47a2c53e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Random.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f2a78c5bb3fa2e44b8d2167c1732b5f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs deleted file mode 100644 index aca88f2e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyActionAction_Shield : EnemyAction -{ - - /*public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - attackDamageText.text = ""; - enemyNode.stateText = "这个敌人将增加" + attackDamageText.text + "点护盾"; - }*/ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_Shield(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs.meta deleted file mode 100644 index 67bddeb4..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shield.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 80b96ad1aba65f249a88b49c55977649 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs deleted file mode 100644 index ee1c251e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyActionAction_Shoot : EnemyAction -{ - /*public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - enemyNode.stateText = "这个敌人将会造成" + attackDamageText.text + "点伤害。" ; - }*/ - public override void AttackRange(EnemyNode enemyNode) - { - ShootAttackRange(enemyNode); - } - - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_Shoot(); - action.sprite = this.sprite; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs.meta deleted file mode 100644 index 132a3ad3..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_Shoot.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 17cd54cb082d7cc48adf198fcc3cf9e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs deleted file mode 100644 index 50acbeb4..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyActionAction_UpBuff :EnemyAction -{ - /*public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - attackDamageText.text = ""; - enemyNode.stateText = "这个敌人将施加强化效果"; - }*/ - - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyActionAction_UpBuff(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs.meta deleted file mode 100644 index d3df275b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyActionAction_UpBuff.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e346c2b54eec93448b8e24b8469161d0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs deleted file mode 100644 index 8be063fe..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_AttackAndPollution : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_AttackAndPollution(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs.meta deleted file mode 100644 index 6e5a16a3..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndPollution.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d87284e8f6669ba41900bdbc52436d20 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs deleted file mode 100644 index c180411d..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -public class EnemyAction_AttackAndShield : EnemyAction -{ - /*public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - Debug.Log("护盾"); - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - enemyNode.stateText = "这个敌人将会造成" + attackDamageText.text + "点伤害并且获得护盾" ; - }*/ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_AttackAndShield(); - action.sprite = this.sprite; - action.isAiming = true; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs.meta deleted file mode 100644 index 673ea835..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_AttackAndShield.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 12592c52a58d234499393729b0f2e197 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs deleted file mode 100644 index c64a30f0..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_BanStep : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_BanStep(); - action.sprite = this.sprite; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs.meta deleted file mode 100644 index ccd158a4..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_BanStep.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 480d13c96b7e04843ad2713607f8f23f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs deleted file mode 100644 index e0b0392e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Nothing : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Nothing(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs.meta deleted file mode 100644 index a7aee4b5..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Nothing.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 628a9c5762584cc47b6291c51b764d34 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs deleted file mode 100644 index e13db602..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Parasitism : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Parasitism(); - action.sprite = this.sprite; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs.meta deleted file mode 100644 index 64acaf94..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Parasitism.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e28c2426b05881f43be09de7d188e0ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs deleted file mode 100644 index 59a5e9e5..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Pollution : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Pollution(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs.meta deleted file mode 100644 index 819045c2..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Pollution.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ddbc10f3e221e3f4eaefbc1192c8fd71 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs deleted file mode 100644 index 6b23f0e7..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_ShieldAndPollution : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_ShieldAndPollution(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs.meta deleted file mode 100644 index a2854930..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShieldAndPollution.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e1f5224e5f14a274dbbef94285fb8103 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs deleted file mode 100644 index b041e981..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -public class EnemyAction_ShootAndPollute : EnemyAction -{ - /*public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - Debug.Log("污染"); - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - enemyNode.stateText = "这个敌人将会造成" + attackDamageText.text + "点伤害并且污染格子。"; - }*/ - public override void AttackRange(EnemyNode enemyNode) - { - ShootAttackRange(enemyNode); - } - - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_ShootAndPollute(); - action.sprite = this.sprite; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs.meta deleted file mode 100644 index e151cc64..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_ShootAndPollute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b6dd7a156765f114bb277b7a63032689 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs deleted file mode 100644 index 60b2de11..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Sleep : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Sleep(); - action.sprite = this.sprite; - action.isAiming = true; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs.meta deleted file mode 100644 index ef2a6cb1..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Sleep.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7f94f02b6b2db0242a16949416218f44 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs deleted file mode 100644 index e880059b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Spell : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Spell(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs.meta deleted file mode 100644 index 8a81cb0f..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Spell.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5a47dfc04da4efc41b116d0eef00a36f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs deleted file mode 100644 index 85540217..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_SpellAndAttack : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_SpellAndAttack(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs.meta deleted file mode 100644 index dc89a5e6..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndAttack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6a473c91d94adc446b207cc410ff3250 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs deleted file mode 100644 index 3c8163ed..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_SpellAndShield : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_SpellAndShield(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs.meta deleted file mode 100644 index 42624afc..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_SpellAndShield.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ffa8343436a1f1b489c45f1394e9b228 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs deleted file mode 100644 index 2111a41e..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Summon : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Summon(); - action.sprite = this.sprite; - action.isAiming = false; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs.meta deleted file mode 100644 index f9cb24c5..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Summon.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 66fc007cbe5249d4e95e53591c16723b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs deleted file mode 100644 index 83e0e056..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EnemyAction_Vulnerable : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Vulnerable(); - action.sprite = this.sprite; - return action; - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs.meta deleted file mode 100644 index 3659b3a0..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Vulnerable.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 472305359e28fd64186c8e70feaf2064 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs deleted file mode 100644 index 0d486039..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyAction_Weak : EnemyAction -{ - public override EnemyAction NewAction() - { - EnemyAction action = new EnemyAction_Weak(); - action.sprite = this.sprite; - return action; - } - - /* public override void SettleText(EnemyNode enemyNode, Text attackDamageText) - { - attackDamageText.text = ""; - enemyNode.stateText = "这个敌人将施加负面效果"; - }*/ -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs.meta deleted file mode 100644 index f3a21842..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/EnemyPlanFunction/EnemyAction_Weak.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1d38a530ddbe8ca4089f84cd6f53a7b1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/FightReward/RewardManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/FightReward/RewardManager.cs index b9d9c4c7..0d4f060d 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/FightReward/RewardManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/FightReward/RewardManager.cs @@ -66,10 +66,7 @@ public class RewardManager : Singleton public void JudgeEnemyOver()//判断是否结束回合 { - if (EnemyManager.Instance.enemySpeedSortingList.Count <= 1) - { - StartCoroutine(WaitGameOver()); - } + } IEnumerator WaitGameOver() { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandler8_1.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandler8_1.cs index e1f1e78e..3211ab80 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandler8_1.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandler8_1.cs @@ -87,7 +87,7 @@ public class EffectRangeHandler8_1 : EffectRangeHandler return canPass; } //Debug.Log("坐标X"+currentNode.locationX+ "坐标Y" + currentNode.locationY); - if (currentNode.TryGetComponent(out EnemyNode enemyNode)) +/* if (currentNode.TryGetComponent(out EnemyNode enemyNode)) { Debug.Log("JJKK"); if (enemyNode.enemyType == EnemyNode.EnemyType.block) @@ -97,7 +97,7 @@ public class EffectRangeHandler8_1 : EffectRangeHandler influencePreviewPool.Add(currentNode); } Debug.Log("DDFF"); - } + }*/ if (canPass) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandlerBase.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandlerBase.cs index 24da16de..63527952 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandlerBase.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Handler/EffectRangeHandlerBase.cs @@ -22,14 +22,14 @@ public class EffectRangeHandlerBase : EffectRangeHandler return canPass; } /*if (currentNode.TryGetComponent(out EnemyNode enemyNode))*/ - if (currentNode.enemyNode != null) +/* if (currentNode.enemyNode != null) { if (currentNode.enemyNode.enemyType.Equals(EnemyNode.EnemyType.block)) { canPass = false; influencePreviewPool.Add(currentNode); } - } + }*/ if (canPass) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/MapManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/MapManager.cs index 73b64837..7b115683 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/MapManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/MapManager.cs @@ -152,7 +152,7 @@ public class MapManager : Singleton Debug.Log("enemyListTest大小" + enemyListTest.Count); Debug.Log("mapList大小" + mapList.Count); - for (int i = 0; i < mapList.Count; i++) +/* for (int i = 0; i < mapList.Count; i++) { Debug.Log("怪物"+ enemyListTest[i]); Debug.Log("mapunity是" + mapList[i]); @@ -162,7 +162,7 @@ public class MapManager : Singleton enemynode.positionY = mapList[i].locationY; enemynode.StartPosition(); - } + }*/ } IEnumerator starttest() { @@ -182,9 +182,9 @@ public class MapManager : Singleton yield return StartCoroutine(SetUpMapUnityForCube()); // yield return StartCoroutine(UPMoveMapUnity()); // yield return new WaitForSeconds(2); - yield return StartCoroutine(GenerateItem()); + //yield return StartCoroutine(GenerateItem()); yield return StartCoroutine(PlayerGenerate()); - yield return StartCoroutine(EnemyGenerate()); + //yield return StartCoroutine(EnemyGenerate()); // yield return StartCoroutine(GenerateMask()); yield return StartCoroutine(CompleteGenerate()); @@ -260,9 +260,6 @@ public class MapManager : Singleton //GameManager.Instance.player.StartPlayer(); GameManager.Instance.complete = true; - EnemyManager.Instance.SpeedSortList(); - EnemyManager.Instance.EnemySortIconGnerate(); - } IEnumerator PlayerGenerate() @@ -272,39 +269,31 @@ public class MapManager : Singleton yield return null; } - IEnumerator EnemyGenerate() + /*IEnumerator EnemyGenerate() { // yield return StartCoroutine(SetUpMapUnity()); if (GameManager.Instance.playerOn != null) { Debug.Log("player在" + GameManager.Instance.playerOn); } - foreach (var enemy in enemyGenerateDataList) - { - var currentEnemy = Instantiate(enemy.enemyPrefab, getNodeTools.LocationToGetNode(enemy.locationX,enemy.locationY).transform.position, enemy.enemyPrefab.transform.rotation); - EnemyNode enemynode = currentEnemy.GetComponent(); - enemynode.positionX = enemy.locationX; - enemynode.positionY = enemy.locationY; - enemynode.StartPosition(); - } LevelDevelopData_SO levelData_SO = PlayerStatsManager.Instance.levelDevelopData; LevelDevelopData_SO.levelData currentLevelData = levelData_SO.levelSaveMap[(int)levelData_SO.currentPoint.x].levelDataList[(int)levelData_SO.currentPoint.y]; List enemyList = new List(); if(currentLevelData .isExtra ==false ) { - /* foreach (var enemyID in currentLevelData.enemyList) + *//* foreach (var enemyID in currentLevelData.enemyList) { enemyList.Add(EnemyPool.enemyIndexToString(int.Parse(enemyID))); - }*/ + }*//* enemyList = currentLevelData.enemyList; } else { - /*foreach (var enemyID in currentLevelData.extraEnemyList) + *//*foreach (var enemyID in currentLevelData.extraEnemyList) { enemyList.Add(EnemyPool.enemyIndexToString(int.Parse(enemyID))); - }*/ + }*//* enemyList = currentLevelData.extraEnemyList; } @@ -351,7 +340,7 @@ public class MapManager : Singleton yield return null; - } + }*/ IEnumerator SetUpMapUnity() { // yield return StartCoroutine(MapGenerate()); @@ -437,7 +426,7 @@ public class MapManager : Singleton } //生成初始物品 - IEnumerator GenerateItem() + /*IEnumerator GenerateItem() { //提前占用玩家初始节点,根据玩家入场方式修改应该会被删除 // GameManager.Instance .X [GameManager .Instance .player .startPositionX ].Y[GameManager.Instance.player.startPositionY].blocked = true; @@ -550,7 +539,7 @@ public class MapManager : Singleton } yield return null; - } + }*/ public bool Scope0fJudgment(int min,int max,int value ) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs index 1eeceeaf..fdd41fec 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs @@ -104,9 +104,6 @@ public class MapUnity : MonoBehaviour } public Direction direction; - [Header("敌人控件")] - public EnemyNode enemyNode;//若此项不为空则敌人在此地块上 - [Header("基础属性控件")] public bool blocked;//此项被勾选则不可行走 @@ -237,10 +234,6 @@ public class MapUnity : MonoBehaviour { return; } - if (LegacyManager.Instance.relicClassNameList.Contains(Name.Legacy.LegacyNode_BloodBorne)&&enemyNode!=null) - { - enemyNode.sufferAbnormalCondition(AbnormalCondition.bleed, 4); - } if (LegacyManager.Instance.isUseful(Name.Legacy.LegacyNode_Filter)&&whoColour==Name.NodeColor.Black) { Usermanager.Instance.Shield += Usermanager.Instance.ShieldCalculation(1); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs index c716cadc..ba0f2301 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs @@ -198,7 +198,7 @@ public class Player : MonoBehaviour MapUnity mapNode = raycastHit.collider.transform.GetComponent(); //角色移动 - if (mapNode .stepInfluenced &&mapNode .blocked ==false &&mapNode .enemyNode ==null&& mapNode.playerOn == false ) + if (mapNode .stepInfluenced &&mapNode .blocked ==false && mapNode.playerOn == false ) { //获得路径 movePath = AStarManager.Instance.FindPathWithEndNode(GameManager.Instance.playerOn, mapNode); @@ -288,7 +288,7 @@ public class Player : MonoBehaviour //改变动画 anim.SetBool("move", false); - SurveillanceCheck(mapNode); + //SurveillanceCheck(mapNode); //取消标记终点 mapNode.markInfluenced = false; TurnMaster.Instance.playerAction = TurnMaster.PlayerAction.none; @@ -313,27 +313,6 @@ public class Player : MonoBehaviour } } } - - public void SurveillanceCheck(MapUnity mapNode) - { - for (int i = 0; i < EnemyManager.Instance.enemySpeedSortingList.Count; i++) - { - if (EnemyManager.Instance.enemySpeedSortingList[i].enemyScript == EnemyNode.EnemyScript.Pollutinel) - { - Pollutinel pollutinel = (Pollutinel)EnemyManager.Instance.enemySpeedSortingList[i].enemy; - HashSet targetSet = new HashSet { mapNode }; - getNodeTools.getCircleNodeForBoom(targetSet, 2); - MapUnity currentNode = getNodeTools.LocationToGetNode(pollutinel.enemyNode.positionX, pollutinel.enemyNode.positionY); - //MapUnity currentNode = getNodeTools.LocationToGetNode(EnemyManager.Instance.enemySpeedSortingList[i].positionX, EnemyManager.Instance.enemySpeedSortingList[i].positionY); - if (pollutinel.isSurveillance == true && targetSet.Contains(currentNode)) - { - Debug.Log("isSurveillance成功"); - Usermanager.Instance.SufferTrueDamage(pollutinel.enemyNode.EnemyState.damage); - pollutinel.isSurveillance = false; - } - } - } - } public void CloseMove() { // StepPreviewInfluencedNode(step); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AStar/AStarManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AStar/AStarManager.cs index 5788087f..34806033 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AStar/AStarManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AStar/AStarManager.cs @@ -222,7 +222,7 @@ public class AStarManager : Singleton { for(int i=0;i if(nodeList[j].unitPool[k] != null ) { MapUnity mapUnity = nodeList[j].unitPool[k]; - if (mapUnity.blocked == true || mapUnity.enemyNode != null || mapUnity.gameObject.activeInHierarchy == false) + if (mapUnity.blocked == true || mapUnity.gameObject.activeInHierarchy == false) { continue; } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Interface/IEnemyObserver.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Interface/IEnemyObserver.cs index 4d52e6c6..c256d107 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Interface/IEnemyObserver.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Interface/IEnemyObserver.cs @@ -16,7 +16,6 @@ public interface IEnemyObserver void ShowExpHp(HashSet mapUnities); void HideExpHP(); - EnemyNode GetEnemyNode(); } \ No newline at end of file diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/MathTool.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/MathTool.cs index 1778925c..5daa1310 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/MathTool.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/MathTool.cs @@ -318,15 +318,6 @@ public class MathTool return new HashSet(set.OrderBy(x => rand.Next()).Take(a)); } - public static HashSet GetRandomElements(HashSet set, int a) - { - System.Random rand = new System.Random(); - if (a >= set.Count) - { - return new HashSet(set); - } - return new HashSet(set.OrderBy(x => rand.Next()).Take(a)); - } public static HashSet GetRandomElements(HashSet set, int a) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/getNodeTools.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/getNodeTools.cs index 0afd9ff1..6eb74bcd 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/getNodeTools.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/getNodeTools.cs @@ -44,7 +44,7 @@ public class getNodeTools public static void playerMoveToNextNode(MapUnity mapNode) { //角色移动 - if ( mapNode.blocked == false && mapNode.enemyNode == null) + if ( mapNode.blocked == false) { if (GameManager.Instance.playerOn != null) { @@ -67,7 +67,7 @@ public class getNodeTools public static void playerTeleportToNode(MapUnity mapNode) { //角色移动 - if (mapNode.blocked == false && mapNode.enemyNode == null) + if (mapNode.blocked == false ) { if (GameManager.Instance.playerOn != null) { @@ -251,7 +251,7 @@ public class getNodeTools { for (int j = 0; j < GameManager.Instance.X[i].Y.Count; j++) { - if (GameManager.Instance.X[i].Y[j].enemyNode==null&& !GameManager.Instance.X[i].Y[j].Equals(GameManager.Instance.playerOn)) + if ( !GameManager.Instance.X[i].Y[j].Equals(GameManager.Instance.playerOn)) { set.Add(GameManager.Instance.X[i].Y[j]); } @@ -300,10 +300,9 @@ public class getNodeTools { if (GameManager.Instance.X[i].Y[j].whoColour.Equals(Name.NodeColor.Black)) { - if (GameManager.Instance.X[i].Y[j].enemyNode==null) - { + set.Add(GameManager.Instance.X[i].Y[j]); - } + } @@ -359,14 +358,6 @@ public class getNodeTools return canPass; } /*if (currentNode.TryGetComponent(out EnemyNode enemyNode))*/ - if (currentNode.enemyNode != null) - { - if (currentNode.enemyNode.enemyType.Equals(EnemyNode.EnemyType.block)) - { - canPass = false; - results.Add(currentNode); - } - } if (canPass) { @@ -400,10 +391,6 @@ public class getNodeTools return canPass; } /*if (currentNode.TryGetComponent(out EnemyNode enemyNode))*/ - if (currentNode.enemyNode != null) - { - canPass = false; - } if (currentNode.Equals(GameManager.Instance.playerOn)) { canPass = false; @@ -487,10 +474,6 @@ public class getNodeTools for (int i = mapUnityList.Count - 1; i >= 0; i--) { - if (mapUnityList[i].enemyNode!=null) - { - mapUnityList.RemoveAt(i); - } } nodeList.Clear(); nodeList.UnionWith(mapUnityList); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs index 6f0dc821..ae400eba 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs @@ -334,49 +334,6 @@ public class CardManager : Singleton } - public static int getRepelCount(MapUnity influencePreviewPool, int count) - { - MapUnity targetNode = GameManager.Instance.playerOn; - List pool = new List { influencePreviewPool }; - int repelCount = 0; - pool.Remove(targetNode); - List sortedPool = MathTool.sortByCubeDistance(pool, targetNode); - foreach (MapUnity mapUnity in sortedPool) - { - if (mapUnity.enemyNode != null && mapUnity.enemyNode.enemyType == EnemyNode.EnemyType.enemy) - { - MapUnity repelNode = mapUnity; - MapUnity endNode = null; - for (int i = 0; i < count; i++) - { - - (int q, int s, int r) = MathTool.findRepelNode(repelNode, targetNode); - if (q == -1 && s == -1 && r == -1) - { - break; - } - MapUnity result = getNodeTools.getNodeWithCube(q, s, r); - if (result == null) - { - break; - } - if (result.enemyNode == null) - { - endNode = result; - } - - - repelNode = result; - } - Debug.Log("endNode是"+endNode.locationX+endNode.locationY); - List path = AStarManager.Instance.FindDirectPath(mapUnity, endNode); - repelCount=path.Count; - } - - - } - return repelCount; - } public static void createOneCardImage(CardOriginalData cardOriginalData,int startX,int startY)//为单独一张卡创建图片 { MapUnity currentNode = CardPictureManager.Instance.ToolX[startX].Y[startY]; diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs deleted file mode 100644 index 3077f121..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class EnemyPlanUIManager : Singleton -{ - public Dictionary enemyPlanUIIconDictionary = new Dictionary(); - - [Header("意图图标")] - public Sprite attackIcon; - public Sprite shootIcon; - public Sprite aoeIcon; - public Sprite shieldIcon; - public Sprite upBuffIcon; - public Sprite deBuffIcon; - public Sprite randomIcon; - public Sprite weakIcon; - public Sprite nothingIcon; - public Sprite shootAndPolluteIcon; - public Sprite attackAndShieldIcon; - public Sprite summonIcon; - public Sprite spellIcon; - public Sprite attackAndPollutionIcon; - public Sprite shiledAndPollutionIcon; - public Sprite spellAndAttackIcon; - public Sprite pollutionIcon; - public Sprite spellAndShieldIcon; - - private void OnEnable() - { - AddEnemyPlanUIIcon(EnemyPlanUIFunction.attack,new EnemyActionAction_Attack(),attackIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.shoot, new EnemyActionAction_Shoot(), shootIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.aoe, new EnemyActionAction_Aoe(), aoeIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.shield, new EnemyActionAction_Shield(), shieldIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.upBuff, new EnemyActionAction_UpBuff(), upBuffIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.deBuff, new EnemyActionAction_DeBuff(), deBuffIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.random, new EnemyActionAction_Random(), randomIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.weak, new EnemyAction_Weak(), weakIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.nothing, new EnemyAction_Nothing (), nothingIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.sleep, new EnemyAction_Sleep (), deBuffIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.shootAndPollute, new EnemyAction_ShootAndPollute(), shootAndPolluteIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.attackAndShield, new EnemyAction_AttackAndShield(), attackAndShieldIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.summon, new EnemyAction_Summon(), summonIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.spell, new EnemyAction_Spell(), spellIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.attackAndPollute, new EnemyAction_AttackAndPollution(),attackAndPollutionIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.shieldAndPollution, new EnemyAction_ShieldAndPollution(), shiledAndPollutionIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.spellAndAttack, new EnemyAction_SpellAndAttack(), spellAndAttackIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.pollution, new EnemyAction_Pollution (), pollutionIcon); - AddEnemyPlanUIIcon(EnemyPlanUIFunction.spellAndShield, new EnemyAction_SpellAndShield(),spellAndShieldIcon); - } - - public void AddEnemyPlanUIIcon(string enemyPlanUIFunction,EnemyAction enemyAction ,Sprite icon) - { - Debug.Log("怪物ui" + enemyPlanUIIconDictionary.Count); - enemyAction.sprite = icon; - enemyPlanUIIconDictionary.Add(enemyPlanUIFunction, enemyAction); - } - - public EnemyAction NewAction(string action) - { - EnemyAction enemyAction = enemyPlanUIIconDictionary[action].NewAction(); - return enemyAction; - } - - #region - /* - - //切换意图UI - private void SwitchIntention(EnemyNode.PlanAction planAction , EnemyNode enemyNode) - { - switch (enemyNode.planAction) - { - case EnemyNode.PlanAction.attack: - planImage.sprite = attackIcon; - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - break; - case EnemyNode.PlanAction.dashAttack: - planImage.sprite = attackIcon; - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier * 2f).ToString(); - break; - case EnemyNode.PlanAction.sheield: - planImage.sprite = shieldIcon; - attackDamageText.text = (enemyNode.EnemyState.upShieldValue).ToString(); - break; - case EnemyNode.PlanAction.shoot: - planImage.sprite = shootIcon; - attackDamageText.text = (enemyNode.EnemyState.damage * enemyNode.EnemyState.damageMultiplier).ToString(); - break; - case EnemyNode.PlanAction.aoe: - planImage.sprite = aoeIcon; - break; - case EnemyNode.PlanAction.upBuff: - planImage.sprite = upBuffIcon; - break; - case EnemyNode.PlanAction.deBuff: - planImage.sprite = deBuffIcon; - break; - case EnemyNode.PlanAction.random: - planImage.sprite = randomIcon; - break; - } - } - - private void SwitchMoveIntention(bool canMove) - { - switch (canMove) - { - case true: - moveIcon.SetActive(true); - break; - case false: - moveIcon.SetActive(false); - break; - - } - } - */ - #endregion -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs.meta deleted file mode 100644 index e73610d2..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/EnemyPlanUIManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c9fc962d0552297428977577f199ea51 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 13 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnitySettleManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnitySettleManager.cs index 2559d2b4..855d4c1d 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnitySettleManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnitySettleManager.cs @@ -40,33 +40,9 @@ public class MapUnitySettleManager : Singleton } - public void EnemyRedGridSettle (EnemyNode enemyNode) - { - int value = 3; - if (Name.NodeColor.PlayerColor.Contains(enemyNode.GetMapGrid().whoColour)) - { - if (LegacyManager.Instance.relicClassNameList.Contains(Name.Legacy.LegacyNode_LavaHeart)) - { - value = 7; - } - enemyNode.sufferAbnormalCondition(AbnormalCondition.fireSeed, value); - } - - } #region 给敌方施加Buff方法 - //给敌方施加火种 - public void AddEnemyFireSeed(EnemyNode enemyNode, int value) - { - enemyNode.sufferAbnormalCondition(AbnormalCondition.fireSeed, value); - if (enemyNode.EnemyState.abnormalCondition[AbnormalCondition.fireSeed].value >= 10) - { - enemyNode.sufferDamage(Usermanager .Instance . DamageCalculation(15), false); - enemyNode.EnemyState.abnormalCondition[AbnormalCondition.fireSeed].value -= 10; - enemyNode.enemyUIBar.RefreshEnemyBuffIcon(); - } - } #endregion diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs deleted file mode 100644 index cab6b42b..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class ObjectItemSettleManager : Singleton -{ - public List readyToActivateEffects = new List(); - - private void Start() - { - GameManager.Instance.usedCardEvent += StartSettleAllBlocks; - } - public void StartSettleAllBlocks() - { - StartCoroutine(SettleAllBlocks(readyToActivateEffects)); - } - public IEnumerator SettleAllBlocks(List blockNodes) - { - yield return new WaitForSeconds(0.5f);//开始先等待确认伤害已经打出,或者更改伤害打出的携程确保伤害输出后再开启结算 - - List blockNodesNew = new List(); - for (int i = 0; i < blockNodes.Count; i++) - { - Debug.Log("范围地块血量" + blockNodes[i].EnemyState.currentNumberOfHits); - if ( blockNodes [i]!=null && blockNodes[i].EnemyState.currentNumberOfHits <= 0) - { - List mapUnities = blockNodes[i].PreviewColorRange(); - if (mapUnities != null) - { - foreach (var node in mapUnities) - { - if (node.enemyNode != null && blockNodesNew.Contains(node.enemyNode) == false&&node .enemyNode != blockNodes[i]) - { - blockNodesNew.Add(node.enemyNode); - } - } - } - - yield return StartCoroutine(blockNodes[i].ActiveEffect()); - if (mapUnities != null) - { - Debug.Log("范围" + mapUnities.Count); - } - else - { - Debug.Log("范围空"); - } - - } - } - - if(blockNodesNew .Count >0) - { - StartCoroutine(SettleAllBlocks(blockNodesNew)); - } - - } - - public void ActivateEffects(EnemyNode enemyNode) - { - //enemyNode . - } -} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs.meta deleted file mode 100644 index c40a5c9d..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/ObjectItemSettleManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 90ef6bc6f4b6bb14287b411057d7c3f3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs index b539e48d..af3254fa 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs @@ -17,10 +17,7 @@ public class SettlementManager : Singleton for (int i = 0; i < influencePreviewPool.Count; i++) { //施加负面 - if (influencePreviewPool[i].enemyNode != null&& influencePreviewPool[i].enemyNode.enemyType!= EnemyNode.EnemyType.block) - { - influencePreviewPool[i].enemyNode.sufferAbnormalCondition(condition, stackVak); - } + } } @@ -28,29 +25,13 @@ public class SettlementManager : Singleton { for (int i = 0; i < influencePreviewPool.Count; i++) { - if (influencePreviewPool[i].enemyNode != null && influencePreviewPool[i].enemyNode.enemyType != EnemyNode.EnemyType.block) - { - if (influencePreviewPool[i].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - } - else - { - influencePreviewPool[i].enemyNode.sufferAbnormalCondition(AbnormalCondition.bleed, stackVak); - } - - } } } public void doubleBleed(List influencePreviewPool) { - if (influencePreviewPool[0].enemyNode != null && influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int originCount = influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition[AbnormalCondition.bleed].value; - int result = originCount * 2; - influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition[AbnormalCondition.bleed].value=result; - } + } public void doubleBleedDamage() @@ -65,12 +46,7 @@ public class SettlementManager : Singleton public void tripleBleed(List influencePreviewPool) { - if (influencePreviewPool[0].enemyNode != null && influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int originCount = influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition[AbnormalCondition.bleed].value; - int result = originCount * 3; - influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition[AbnormalCondition.bleed].value = result; - } + } //造成伤害 @@ -134,7 +110,7 @@ public class SettlementManager : Singleton //预计地块计数(包含改色预览) public void PreviewColorMapUnity(CardOriginalData cardOriginalData, MapUnity targetNode) { - List blockNodes = new List();//顺序结算被打爆地块的效果 + //List blockNodes = new List();//顺序结算被打爆地块的效果 mapUnityColorPreviewCountPool.Clear(); Vector3 face = targetNode.transform.position - GameManager.Instance.playerOn.transform.position; @@ -183,12 +159,12 @@ public class SettlementManager : Singleton } endNode.switchPreColor(Name.stringColorToint(cardOriginalData.nodesColor[i]));//切换预览材质,并且改变预接受色 - if (endNode .enemyNode != null ) +/* if (endNode .enemyNode != null ) { blockNodes.Add(endNode.enemyNode); - } + }*/ - ObjectItemSettleManager.Instance.readyToActivateEffects = blockNodes; + //ObjectItemSettleManager.Instance.readyToActivateEffects = blockNodes; } } // SettleAllBlocks(blockNodes); @@ -207,7 +183,7 @@ public class SettlementManager : Singleton } return mapColorCount; } - public void SettleAllBlocks(List blockNodes) + /*public void SettleAllBlocks(List blockNodes) { List blockNodesNew = new List(); for (int i = 0; i < blockNodes.Count; i++) @@ -232,7 +208,7 @@ public class SettlementManager : Singleton SettleAllBlocks(blockNodesNew); } - } + }*/ //预览涂色颜色 public void PreviewSwitchColor(CardOriginalData cardOriginalData, MapUnity targetNode) { @@ -323,33 +299,6 @@ public class SettlementManager : Singleton GameManager.Instance.playerState.currentCost += nodeCount/val; } - private void settleHalfBleed(List influencePreviewPool) - { - if (influencePreviewPool[0].enemyNode != null && influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int originCount = influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition[AbnormalCondition.bleed].value; - int result = originCount/2; - int settleCount = originCount = result; - for (int i = 0; i < settleCount; i++) - { - influencePreviewPool[0].enemyNode.bleedRealize(); - } - - - } - } - - private void settleAllBleed(List influencePreviewPool) - { - if (influencePreviewPool[0].enemyNode != null && influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - int originCount = influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition[AbnormalCondition.bleed].value; - for (int i = 0; i < originCount; i++) - { - influencePreviewPool[0].enemyNode.bleedRealize(); - } - } - } /* private void consumePlayerNodesForHealthWork(List influencePreviewPool) { @@ -405,61 +354,7 @@ public class SettlementManager : Singleton Usermanager.Instance.recoverHp(successNodeCount*2); }*/ - private void damageForNextNode(List influencePreviewPool,int damageVal,int pierceNum) - { - ZeroToFiveCircularCounter counter=new ZeroToFiveCircularCounter(); - int platerPosition=0; - Debug.Log("influencePreviewPool大小" + influencePreviewPool.Count); - if (influencePreviewPool[0].enemyNode!=null) - { - damageWork(damageVal,influencePreviewPool, pierceNum); - } - else - { - for (int i = 0; i < 5; i++) - { - if (influencePreviewPool[0].unitPool[i].Equals(GameManager.Instance.playerOn)) - { - platerPosition = i; - } - } - Debug.Log("platerPosition" + platerPosition); - int damagePosition = counter.Add(platerPosition, 3); - Debug.Log("damagePositionl" + damagePosition); - getNodeTools.playerMoveToNextNode(influencePreviewPool[0]); - if (influencePreviewPool[0].unitPool[damagePosition]!=null) - { - List damageNode = new List { influencePreviewPool[0].unitPool[damagePosition] }; - damageWork(damageVal, damageNode, pierceNum); - } - - } - } - - private void damageForFlippyRange2(List influencePreviewPool, string damageValAndflippyNum, int pierceNum ) - { - string[] values = damageValAndflippyNum.Split("_"); - int damageVal = int.Parse(values[0]); - int flippyNum = int.Parse(values[1]); - damageWork(damageVal, influencePreviewPool, pierceNum); - HashSet mapUnities = new HashSet(influencePreviewPool); - getNodeTools.getCircleNodeExceptSelf(mapUnities, 2); - for (int i = 0; i < flippyNum; i++) - { - if(findEnemy(mapUnities)!=null) - { - List targetNode= new List { findEnemy(mapUnities) }; - damageWork(damageVal, targetNode, pierceNum); - mapUnities.Clear(); - mapUnities= new HashSet(targetNode); - getNodeTools.getCircleNodeExceptSelf(mapUnities, 2); - } - else - { - break; - } - } - } + private void randomAttactCardToHand() { @@ -505,7 +400,7 @@ public class SettlementManager : Singleton } - private MapUnity findEnemy(HashSet mapUnityPool) +/* private MapUnity findEnemy(HashSet mapUnityPool) { foreach(MapUnity mapUnity in mapUnityPool) { @@ -515,35 +410,9 @@ public class SettlementManager : Singleton } } return null; - } - - - private void teleport(List influencePreviewPool) - { - if (influencePreviewPool[0].enemyNode != null) - { - } - else - { - getNodeTools.playerTeleportToNode(influencePreviewPool[0]); + }*/ - } - } - public void teleportAndDamageAround(List influencePreviewPool,int damage) - { - if (influencePreviewPool[0].enemyNode != null) - { - } - else - { - getNodeTools.playerTeleportToNode(influencePreviewPool[0]); - HashSet values = new HashSet { influencePreviewPool[0]}; - getNodeTools.getCircleNode(values,1); - damageWork(damage, values.ToList(), 0); - - } - } public void teleportAround(List influencePreviewPool) { @@ -556,7 +425,7 @@ public class SettlementManager : Singleton } - private void repelFromPlayer (List influencePreviewPool, MapUnity targetNode,int count) + /*private void repelFromPlayer (List influencePreviewPool, MapUnity targetNode,int count) { targetNode = GameManager.Instance.playerOn; List pool= new List(influencePreviewPool); @@ -601,9 +470,9 @@ public class SettlementManager : Singleton } } - } + }*/ - private void repelFromNode(List influencePreviewPool, MapUnity targetNode, int count) + /*private void repelFromNode(List influencePreviewPool, MapUnity targetNode, int count) { List pool = new List(influencePreviewPool); pool.Remove(targetNode); @@ -630,47 +499,10 @@ public class SettlementManager : Singleton } } - } - private void pullFirstEnemyToSelf(List influencePreviewPool) - { - /*List ememyList = new List(); - List emptyNodeList = new List(); - foreach(MapUnity mapUnity in influencePreviewPool) - { - if (mapUnity.enemyNode==null) - { - emptyNodeList.Add(mapUnity); - } - else - { - ememyList.Add(mapUnity); - } - }*/ - if (influencePreviewPool[0].enemyNode!=null) - { - return; - } - foreach(MapUnity mapUnity in influencePreviewPool) - { - if (mapUnity.enemyNode != null) - { - if (mapUnity.enemyNode.enemyType == EnemyNode.EnemyType.block) - { - return; - } - else - { - GameObject enemy = mapUnity.enemyNode.GameObject(); - Debug.Log(enemy); - enemyMoveToNode(enemy, influencePreviewPool[0], mapUnity.enemyNode); - return; - } - } - } - - } + }*/ + - private void ParasitismnRealize(EnemyNode enemyNode, MapUnity start, MapUnity end) + /*private void ParasitismnRealize(EnemyNode enemyNode, MapUnity start, MapUnity end) { if (enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.parasitism) || enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.corrode)) { @@ -693,9 +525,9 @@ public class SettlementManager : Singleton } - } + }*/ - private void enemyMoveToNode(GameObject enemy,MapUnity endNode, EnemyNode enemyNode) + /*private void enemyMoveToNode(GameObject enemy,MapUnity endNode, EnemyNode enemyNode) { if (endNode==null||endNode.enemyNode != null||!endNode.gameObject.activeInHierarchy) { @@ -721,12 +553,12 @@ public class SettlementManager : Singleton enemy.transform.position = Vector3.Lerp(enemy.transform.position, endNode.transform.position, Time.deltaTime * 4); } ParasitismnRealize(enemyNode,currentNode,endNode); - /*for (int i = 0; i < bleedCount; i++) + *//*for (int i = 0; i < bleedCount; i++) { enemyNode.bleedRealize(); - }*/ + }*//* //enemy.transform.position = new Vector3(endNode.transform.position.x, 0.5f, endNode.transform.position.z); - } + }*/ private void currentStepChange(int val) { @@ -743,78 +575,13 @@ public class SettlementManager : Singleton } public void damageWork(int damageVal, List influencePreviewPool,int pierceNum) { - int pierceCount=0; - pierceNum = -1; - if (pierceNum!=-1) - { - for (int i = 0; i < influencePreviewPool.Count; i++) - { - //造成伤害 - if (influencePreviewPool[i].enemyNode != null) - { - pierceCount++; - influencePreviewPool[i].enemyNode.sufferDamage(Usermanager.Instance.DamageCalculation(damageVal), true); - if (pierceCount>=pierceNum+1) - { - break; - } - } - } - } - else - { - for (int i = 0; i < influencePreviewPool.Count; i++) - { - //造成伤害 - if (influencePreviewPool[i].enemyNode != null) - { - influencePreviewPool[i].enemyNode.sufferDamage(Usermanager.Instance.DamageCalculation(damageVal), true); - } - } - } + } public void damageWorkIfKillRestoreCost(int damageVal, List influencePreviewPool, int pierceNum,int restoreCost) { - int pierceCount = 0; - pierceNum = -1; - bool ifKilled=false; - if (pierceNum != -1) - { - for (int i = 0; i < influencePreviewPool.Count; i++) - { - //造成伤害 - if (influencePreviewPool[i].enemyNode != null) - { - pierceCount++; - influencePreviewPool[i].enemyNode.sufferDamageIfKilled(Usermanager.Instance.DamageCalculation(damageVal), true,ref ifKilled); - if (ifKilled) - { - GameManager.Instance.playerState.currentCost += restoreCost; - } - if (pierceCount >= pierceNum + 1) - { - break; - } - } - } - } - else - { - for (int i = 0; i < influencePreviewPool.Count; i++) - { - //造成伤害 - if (influencePreviewPool[i].enemyNode != null) - { - influencePreviewPool[i].enemyNode.sufferDamageIfKilled(Usermanager.Instance.DamageCalculation(damageVal), true, ref ifKilled); - if (ifKilled) - { - GameManager.Instance.playerState.currentCost += restoreCost; - } - } - } - } + } @@ -1029,10 +796,8 @@ public class SettlementManager : Singleton tripleBleed(influencePreviewPool); break; case CardFunction.settleHalfBleed: - settleHalfBleed(influencePreviewPool); break; case CardFunction.settleAllBleed: - settleAllBleed(influencePreviewPool); break; case CardFunction.bleedForRedNode: abnormalConditionWork(CardFunction.bleed, int.Parse(kvp.Value), new List(getNodeTools.getNodesWithColor(Name.Color.Red))); @@ -1059,10 +824,10 @@ public class SettlementManager : Singleton break; case CardFunction.repel: case CardFunction.repelRound: - repelFromPlayer(influencePreviewPool, targetNode,int.Parse(kvp.Value)); + //repelFromPlayer(influencePreviewPool, targetNode,int.Parse(kvp.Value)); break; case CardFunction.repelToEnd: - repelFromPlayer(influencePreviewPool, targetNode, 100); + //repelFromPlayer(influencePreviewPool, targetNode, 100); break; case CardFunction.dyeingAround: dyeingAroundWork(influencePreviewPool); @@ -1086,10 +851,9 @@ public class SettlementManager : Singleton teleportAround(new List { targetNode }); break; case CardFunction.teleportAndDamageAround: - teleportAndDamageAround(influencePreviewPool, int.Parse(kvp.Value)); break; case CardFunction.pullFirstEnemyToSelf: - pullFirstEnemyToSelf(influencePreviewPool); + //pullFirstEnemyToSelf(influencePreviewPool); break; case CardFunction.randomAttactCardToHand: break; @@ -1105,12 +869,7 @@ public class SettlementManager : Singleton case CardFunction.shieldToDamage: damageWork(Usermanager.Instance.Shield, influencePreviewPool, pierceNum); break; - case CardFunction.ifBleedThenShield: - if (influencePreviewPool[0].enemyNode!=null&& - influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) - { - Usermanager.Instance.Shield += Usermanager.Instance.ShieldCalculation(int.Parse(kvp.Value)); - } + case CardFunction.ifBleedThenShield: break; case CardFunction.ember: case CardFunction.agile: @@ -1153,17 +912,6 @@ public class SettlementManager : Singleton StartCoroutine(TurnMaster.Instance.MoveCards());*/ break; case CardFunction.placeTrees: - Debug.Log("放置了树"); - foreach (var mapNode in influencePreviewPool ) - { - Vector3 pos = mapNode.transform.position; - pos.y = 1; - var tree = Instantiate(CardResourcesManager.Instance.tree, pos, Quaternion.identity); - mapNode.enemyNode = tree.GetComponent(); - mapNode.enemyNode.positionX = mapNode.locationX; - mapNode.enemyNode.positionY = mapNode.locationY; - mapNode.blocked = true; - } break; } @@ -1218,7 +966,7 @@ public class SettlementManager : Singleton } Usermanager.Instance.RefreshPlayerBuffIcon(); GameManager.Instance.SyncColourCountUI(); - EnemyManager.Instance.enemyRefreshEnemyBuffIcon(0); + //EnemyManager.Instance.enemyRefreshEnemyBuffIcon(0); //广播释放完一张卡牌的接口 GameManager.Instance.BroadCastWhirlpoolEffectSycn(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/Usermanager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/Usermanager.cs index a3610bde..65165e08 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/Usermanager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/Usermanager.cs @@ -510,24 +510,24 @@ public class Usermanager : Singleton } - public void SufferDamage(int damage,EnemyNode enemyNode) + public void SufferDamage(int damage) { /* if (MapUnityManager.Instance.isPlayerOn(Name.NodeColor.Blue)) { damage -= 2; MathTool.keepNature(ref damage); }*/ - if (enemyNode != null) +/* if (enemyNode != null) { thornCal(enemyNode); - } + }*/ bleedCal(); - if (playerAbnormalCondition.ContainsKey(AbnormalCondition.fireShield)&& enemyNode != null) +/* if (playerAbnormalCondition.ContainsKey(AbnormalCondition.fireShield)&& enemyNode != null) { enemyNode.sufferAbnormalCondition(AbnormalCondition.fireSeed, 2); - } + }*/ MathTool.keepNature(ref damage); - SufferDamageCalculation(damage,enemyNode); + SufferDamageCalculation(damage); checkDeath(); @@ -569,17 +569,8 @@ public class Usermanager : Singleton } } - private void thornCal(EnemyNode enemyNode) + private void thornCal() { - if (playerAbnormalCondition.ContainsKey(AbnormalCondition.thorn)) - { - enemyNode.sufferDamage(playerAbnormalCondition[AbnormalCondition.thorn].value,false); - if (playerAbnormalCondition[AbnormalCondition.thorn].value <= 0) - { - playerAbnormalCondition.Remove(AbnormalCondition.thorn); - } - - } } #region Buff结算函数 @@ -695,7 +686,7 @@ public class Usermanager : Singleton return damage; } - public int SufferDamageCalculation(int damage,EnemyNode enemyNode) + public int SufferDamageCalculation(int damage) { if (playerAbnormalCondition.ContainsKey(AbnormalCondition.vulnerable)) { @@ -724,19 +715,6 @@ public class Usermanager : Singleton } int shieldDamage = damage; bool isDouble=false; - if (enemyNode.enemyScript == EnemyNode.EnemyScript.ContaminatusImmortalis) - { - MapUnity currentNode = getNodeTools.LocationToGetNode(enemyNode.positionX, enemyNode.positionY); - HashSet targets = new HashSet { currentNode }; - getNodeTools.getCircleNodeForBoom(targets, 1); - foreach (MapUnity target in targets) - { - if (target.whoColour == Name.NodeColor.Black) - { - isDouble = true; - } - } - } if (isDouble) { shieldDamage = damage * 2; @@ -784,7 +762,7 @@ public class Usermanager : Singleton { if (playerAbnormalCondition.ContainsKey(AbnormalCondition.bleed)) { - SufferDamage(2, null); + //SufferDamage(2, null); playerAbnormalCondition[AbnormalCondition.bleed].value -= 1; if (playerAbnormalCondition[AbnormalCondition.bleed].value <= 0) {