1
This commit is contained in:
@@ -73,11 +73,11 @@ namespace BITFALL
|
||||
{
|
||||
playerService.OnPlayerInitialized -= OnStartLocalPlayer;
|
||||
}
|
||||
private void OnStartLocalPlayer(IEntity entity)
|
||||
private void OnStartLocalPlayer(IUnityEntity unityEntity)
|
||||
{
|
||||
cache.Clear();
|
||||
|
||||
entity.Inject(this);
|
||||
unityEntity.Inject(this);
|
||||
|
||||
_entityEquipment.OnEquip += OnEquip;
|
||||
_entityEquipment.OnUnEquip += OnUnEquip;
|
||||
|
@@ -86,9 +86,9 @@ namespace BITFALL.UX
|
||||
{
|
||||
seleableLabel.SetActive(false);
|
||||
}
|
||||
private async void OnPlayerInitializedLocalPlayer(IEntity entity)
|
||||
private async void OnPlayerInitializedLocalPlayer(IUnityEntity unityEntity)
|
||||
{
|
||||
entity.Inject(this);
|
||||
unityEntity.Inject(this);
|
||||
|
||||
|
||||
_health.OnSetAlive += OnSetAlive;
|
||||
@@ -113,7 +113,7 @@ namespace BITFALL.UX
|
||||
playerAvatarImage.SetTexture(avatar);
|
||||
}
|
||||
|
||||
_equipService = entity.Get<IEquipService>();
|
||||
_equipService = unityEntity.Get<IEquipService>();
|
||||
|
||||
armorBar.SetActive(_armor.TryGetCurrentArmor(out _));
|
||||
|
||||
|
@@ -37,7 +37,7 @@ namespace BITFALL.UX
|
||||
private IEntityInventory inventory;
|
||||
[Inject]
|
||||
private IEntityEquipmentContainer equipContainer;
|
||||
private IEntity _entity;
|
||||
private IUnityEntity _unityEntity;
|
||||
protected override async void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@@ -52,7 +52,7 @@ namespace BITFALL.UX
|
||||
equipContainers.Add(x.Name, uxContainer);
|
||||
element.RegisterCallback<MouseDownEvent>(mouseEvent =>
|
||||
{
|
||||
if(_entity is null) return;
|
||||
if(_unityEntity is null) return;
|
||||
switch (mouseEvent.button)
|
||||
{
|
||||
case 0:
|
||||
@@ -83,13 +83,13 @@ namespace BITFALL.UX
|
||||
playerService.OnPlayerDisposed -= OnPlayerDisposed;
|
||||
playerService.OnPlayerInitialized -= OnPlayerInitializedLocalPlayer;
|
||||
}
|
||||
private void OnPlayerInitializedLocalPlayer(IEntity entity)
|
||||
private void OnPlayerInitializedLocalPlayer(IUnityEntity unityEntity)
|
||||
{
|
||||
entity.Inject(this);
|
||||
unityEntity.Inject(this);
|
||||
itemContainers.Clear();
|
||||
builder.Clear();
|
||||
|
||||
var weighted = entity.Get<IPlayerInventoryWeightable>();
|
||||
var weighted = unityEntity.Get<IPlayerInventoryWeightable>();
|
||||
|
||||
weighted.OnWeighted += OnWeighted;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace BITFALL.UX
|
||||
inventory.OnUsedItem += OnRemove;
|
||||
inventory.OnSet += OnSet;
|
||||
|
||||
_entity = entity;
|
||||
_unityEntity = unityEntity;
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user