Remove usages of obsolete SpriteView.Sprite.set() (#19500)
This commit is contained in:
@@ -120,12 +120,12 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
|
||||
|
||||
if (_entities.TryGetComponent(hand.HeldEntity, out HandVirtualItemComponent? virt))
|
||||
{
|
||||
handButton.SpriteView.Sprite = _entities.GetComponentOrNull<SpriteComponent>(virt.BlockingEntity);
|
||||
handButton.SpriteView.SetEntity(virt.BlockingEntity);
|
||||
handButton.Blocked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
handButton.SpriteView.Sprite = _entities.GetComponentOrNull<SpriteComponent>(hand.HeldEntity);
|
||||
handButton.SpriteView.SetEntity(hand.HeldEntity);
|
||||
handButton.Blocked = false;
|
||||
}
|
||||
}
|
||||
@@ -171,12 +171,12 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
|
||||
|
||||
if (_entities.TryGetComponent(entity, out HandVirtualItemComponent? virt))
|
||||
{
|
||||
hand.SpriteView.Sprite = _entities.GetComponentOrNull<SpriteComponent>(virt.BlockingEntity);
|
||||
hand.SpriteView.SetEntity(virt.BlockingEntity);
|
||||
hand.Blocked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
hand.SpriteView.Sprite = _entities.GetComponentOrNull<SpriteComponent>(entity);
|
||||
hand.SpriteView.SetEntity(entity);
|
||||
hand.Blocked = false;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
|
||||
if (hand == null)
|
||||
return;
|
||||
|
||||
hand.SpriteView.Sprite = null;
|
||||
hand.SpriteView.SetEntity(null);
|
||||
if (_playerHandsComponent?.ActiveHand?.Name == name)
|
||||
HandsGui?.UpdatePanelEntity(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user