Enemies base
This commit is contained in:
1 parent
cb05da5e89
commit
b02e201cd0
532 files changed
+60713
-58412
No files matched your search
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using Code.Game.Entities;
|
||||
using Code.Game.OfficeGame.BattleMode;
|
||||
using Code.Game.OfficeGame.Entities;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
@@ -347,6 +348,23 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
private async UniTask<(BattleActionDecisionResult, BattleActionData)> DecideAction(CancellationToken ctx,
|
||||
EntityProperties entity)
|
||||
|
||||
{
|
||||
if(entity.Team == EntityTeam.Good)
|
||||
{
|
||||
var (decisionResult, actionData) = await DecideForPlayer(ctx, entity);
|
||||
|
||||
if (decisionResult == null || actionData == null)
|
||||
throw new ArgumentNullException(nameof(decisionResult));
|
||||
|
||||
return (decisionResult, actionData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (null,null);
|
||||
}
|
||||
|
||||
private async UniTask<(BattleActionDecisionResult decisionResult, BattleActionData actionData)> DecideForPlayer(CancellationToken ctx, EntityProperties entity)
|
||||
{
|
||||
_battleActionDecisionPanel.SetEntityInfo(entity.battleActionTypes);
|
||||
|
||||
@@ -434,9 +452,6 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
|
||||
_battleActionDatas[entityId] = entityActionDataSnapshot;
|
||||
_actionDecisionResults[entityId] = entityResultSnapshot;
|
||||
|
||||
if (decisionResult == null || actionData == null) throw new ArgumentNullException(nameof(decisionResult));
|
||||
|
||||
return (decisionResult, actionData);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user