-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
921e79a
commit 1ab6009
Showing
17 changed files
with
413 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Assets/App/Scripts/Battle/Datastores/BattleSkillDatastore.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using App.Battle.Data; | ||
using App.Common.Data; | ||
using App.Battle.Interfaces.Datastores; | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using UniRx; | ||
|
||
namespace App.Battle.Datastores | ||
{ | ||
public class BattleSkillDatastore : IBattleEnemyDatastore, IDisposable | ||
{ | ||
private Dictionary<string, > _enemies = new(); | ||
public IEnumerable<Enemy> Enemies => _enemies.Values.ToArray(); | ||
|
||
|
||
public void RemoveEnemy(string id) | ||
{ | ||
if(!_enemies.ContainsKey(id)) | ||
{ | ||
return; | ||
} | ||
_enemies.Remove(id); | ||
} | ||
|
||
public Enemy GetEnemyBy(string id) | ||
{ | ||
if(!_enemies.ContainsKey(id)) | ||
{ | ||
return null; | ||
} | ||
|
||
var enemy = _enemies[id]; | ||
UnityEngine.Debug.Log($"{enemy} got"); | ||
return enemy; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
_enemies.Clear(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/App/Scripts/Battle/Datastores/BattleSkillDatastore.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
...terfaces/Presenters/IUseSkillPresenter.cs → ...es/Presenters/IBattleUseSkillPresenter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
using App.Battle.Data; | ||
using App.Common.Data; | ||
using App.Common.Data.MasterData; | ||
|
||
namespace App.Battle.Interfaces.Presenters | ||
{ | ||
public interface IUseSkillPresenter | ||
public interface IBattleUseSkillPresenter | ||
{ | ||
HealthPoint CalculateDamage(CharacterParameter player, BattleSkillData skill, EnemyMasterData enemy); | ||
HealthPoint CalculateDamage(CharacterParameter player, BattleSkillData skill, Enemy enemy); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 5 additions & 4 deletions
9
Assets/App/Scripts/Battle/Presenters/BattleUseSkillPresenter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.