74 lines
2.6 KiB
C#
74 lines
2.6 KiB
C#
using Chickensoft.Collections;
|
|
using Godot;
|
|
|
|
namespace GameJamDungeon
|
|
{
|
|
[GlobalClass]
|
|
public partial class PlayerStatInfo : Resource, ICharacterStats
|
|
{
|
|
[Export]
|
|
public double CurrentHP { get => _currentHP.Value; set => _currentHP.OnNext(value); }
|
|
|
|
[Export]
|
|
public double MaximumHP { get => _maximumHP.Value; set => _maximumHP.OnNext(value); }
|
|
|
|
[Export]
|
|
public int CurrentVT { get => _currentVT.Value; set => _currentVT.OnNext(value); }
|
|
|
|
[Export]
|
|
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); }
|
|
|
|
[Export]
|
|
public double Luck { get => _luck.Value; set => _luck.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);
|
|
|
|
private readonly AutoProp<double> _luck = new AutoProp<double>(0.0);
|
|
}
|
|
}
|