Big fix of inventory system, add accessory item type
This commit is contained in:
@@ -75,7 +75,7 @@ namespace GameJamDungeon
|
||||
|
||||
[Node] public IArea3D CollisionDetector { get; set; } = default!;
|
||||
|
||||
private IAutoProp<WeaponInfo> EquippedWeapon { get; set; } = default!;
|
||||
private IAutoProp<Weapon> EquippedWeapon { get; set; } = default!;
|
||||
|
||||
private AutoProp<double> _currentHP { get; set; } = default!;
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace GameJamDungeon
|
||||
GameRepo.SetPlayerGlobalPosition(GlobalPosition);
|
||||
GameRepo.PlayerGlobalPosition.Sync += OnPlayerPositionUpdated;
|
||||
|
||||
EquippedWeapon = new AutoProp<WeaponInfo>(WeaponInfo.Default);
|
||||
EquippedWeapon = new AutoProp<Weapon>(new Weapon());
|
||||
EquippedWeapon.Sync += OnEquippedWeaponChanged;
|
||||
|
||||
_currentHP = new AutoProp<double>(PlayerStatInfo.MaximumHP);
|
||||
@@ -209,7 +209,7 @@ namespace GameJamDungeon
|
||||
AnimationPlayer.AnimationFinished -= OnAnimationFinished;
|
||||
}
|
||||
|
||||
private void OnEquippedWeaponChanged(WeaponInfo info) => Hitbox.Damage = info.Damage;
|
||||
private void OnEquippedWeaponChanged(Weapon info) => Hitbox.Damage = info.WeaponInfo.Damage;
|
||||
|
||||
private void OnHPChanged(double newHP)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user