Fix texture stuff
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using Zennysoft.Ma.Godot.Adapter;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
@@ -15,7 +14,7 @@ public partial class ThrownItem : RigidBody3D
|
||||
|
||||
[Dependency] public IGame Game => this.DependOn<IGame>();
|
||||
|
||||
public IInventoryItem ItemThatIsThrown;
|
||||
public InventoryItem ItemThatIsThrown;
|
||||
|
||||
private EffectService _effectService;
|
||||
|
||||
@@ -25,7 +24,7 @@ public partial class ThrownItem : RigidBody3D
|
||||
{
|
||||
BodyEntered += ThrownItem_BodyEntered;
|
||||
GlobalPosition = Player.CurrentPosition;
|
||||
Sprite.Texture = ((InventoryItem)ItemThatIsThrown).ItemStats.Texture;
|
||||
Sprite.Texture = ItemThatIsThrown.GetTexture();
|
||||
AddCollisionExceptionWith((Node)Player);
|
||||
}
|
||||
|
||||
@@ -39,7 +38,7 @@ public partial class ThrownItem : RigidBody3D
|
||||
public void Throw(EffectService effectService)
|
||||
{
|
||||
_effectService = effectService;
|
||||
ApplyCentralImpulse(-Player.CurrentBasis.Z.Normalized() * ((InventoryItem)ItemThatIsThrown).ThrowSpeed);
|
||||
ApplyCentralImpulse(-Player.CurrentBasis.Z.Normalized() * ItemThatIsThrown.ThrowSpeed);
|
||||
}
|
||||
|
||||
public void RescueItem()
|
||||
|
||||
Reference in New Issue
Block a user