Fix up equipping inventory items, fill out the rest of the inventory labels

This commit is contained in:
2024-09-09 23:05:44 -07:00
parent 4986cca661
commit b5798e7bc0
17 changed files with 340 additions and 108 deletions

View File

@@ -1,4 +1,5 @@
using Godot;
using Chickensoft.Collections;
using Godot;
namespace GameJamDungeon
{
@@ -6,15 +7,62 @@ namespace GameJamDungeon
public partial class PlayerStatInfo : Resource, ICharacterStats
{
[Export]
public double MaximumHP { get; set; }
public double CurrentHP { get => _currentHP.Value; set => _currentHP.OnNext(value); }
[Export]
public int MaximumVT { get; set; }
public double MaximumHP { get => _maximumHP.Value; set => _maximumHP.OnNext(value); }
[Export]
public int BaseAttack { get; set; }
public int CurrentVT { get => _currentVT.Value; set => _currentVT.OnNext(value); }
[Export]
public int BaseDefense { get; set; }
public int MaximumVT { get => _maximumVT.Value; set => _maximumVT.OnNext(value); }
[Export]
public int CurrentLevel { get => _currentLevel.Value; set => _currentLevel.OnNext(value); }
[Export]
public int CurrentEXP { get => _currentExp.Value; set => _currentExp.OnNext(value); }
[Export]
public int EXPToNextLevel { get => _expToNextLevel.Value; set => _expToNextLevel.OnNext(value); }
[Export]
public int CurrentAttack { get => _currentAttack.Value; set => _currentAttack.OnNext(value); }
[Export]
public int MaxAttack { get => _maxAttack.Value; set => _maxAttack.OnNext(value); }
[Export]
public int CurrentDefense { get => _currentDefense.Value; set => _currentDefense.OnNext(value); }
[Export]
public int MaxDefense { get => _maxDefense.Value; set => _maxDefense.OnNext(value); }
[Export]
public int BonusAttack { get => _bonusAttack.Value; set => _bonusAttack.OnNext(value); }
[Export]
public int BonusDefense { get => _bonusDefense.Value; set => _bonusDefense.OnNext(value); }
// AutoProp backing data
private readonly AutoProp<double> _currentHP = new AutoProp<double>(0);
private readonly AutoProp<double> _maximumHP = new AutoProp<double>(0);
private readonly AutoProp<int> _currentVT = new AutoProp<int>(0);
private readonly AutoProp<int> _maximumVT = new AutoProp<int>(0);
private readonly AutoProp<int> _currentExp = new AutoProp<int>(0);
private readonly AutoProp<int> _expToNextLevel = new AutoProp<int>(0);
private readonly AutoProp<int> _currentLevel = new AutoProp<int>(0);
private readonly AutoProp<int> _currentAttack = new AutoProp<int>(0);
private readonly AutoProp<int> _currentDefense = new AutoProp<int>(0);
private readonly AutoProp<int> _maxAttack = new AutoProp<int>(0);
private readonly AutoProp<int> _maxDefense = new AutoProp<int>(0);
private readonly AutoProp<int> _bonusAttack = new AutoProp<int>(0);
private readonly AutoProp<int> _bonusDefense = new AutoProp<int>(0);
}
}