refactor 3:
- EnemyManager.cs 不再计算 droppedCoin / droppedGold / baseDamage,只在敌人隐藏完成后区分“击杀”还是“非击杀到家”,并把 DREnemy 上报给 CombatScheduler。 - CombatScheduler.cs 新增统一入口: - OnEnemyDefeated(DREnemy enemy):通过 EnemyDropResolver 解析掉落,再调用 CombatInRunResourceManager 入账,并按结果决定是否触发局外掉落判定。 - OnEnemyReachedBase(DREnemy enemy):从 enemy.BaseDamage 解析伤害,再统一扣减基地血量。
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework.DataTable;
|
||||
using GameFramework.DataTable;
|
||||
using System;
|
||||
using GeometryTD.CustomUtility;
|
||||
using GeometryTD.DataTable;
|
||||
@@ -17,7 +10,7 @@ namespace GeometryTD
|
||||
{
|
||||
public static class EntityExtension
|
||||
{
|
||||
private static int s_SerialId = 0;
|
||||
private static int _serialId = 0;
|
||||
|
||||
public static EntityBase GetGameEntity(this EntityComponent entityComponent, int entityId)
|
||||
{
|
||||
@@ -97,7 +90,7 @@ namespace GeometryTD
|
||||
|
||||
public static int GenerateSerialId(this EntityComponent entityComponent)
|
||||
{
|
||||
return --s_SerialId;
|
||||
return --_serialId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user