Clean up
This commit is contained in:
@@ -20,7 +20,7 @@ public interface IPlayer : IKillable, IProvide<ISaveChunk<PlayerData>>
|
||||
|
||||
public void Knockback(float impulse);
|
||||
|
||||
public void GainExp(int expGained);
|
||||
public void GainExp(double expGained);
|
||||
|
||||
public void LevelUp();
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public partial class Player : CharacterBody3D, IPlayer
|
||||
_knockbackDirection = GlobalBasis.Z.Normalized();
|
||||
}
|
||||
|
||||
public void GainExp(int expGained)
|
||||
public void GainExp(double expGained)
|
||||
{
|
||||
Stats.SetCurrentExp(Stats.CurrentExp.Value + expGained);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ public partial class Player : CharacterBody3D, IPlayer
|
||||
Die();
|
||||
}
|
||||
|
||||
private void CurrentEXP_Sync(int newExp)
|
||||
private void CurrentEXP_Sync(double newExp)
|
||||
{
|
||||
if (Stats.CurrentExp.Value >= Stats.ExpToNextLevel.Value)
|
||||
LevelUp();
|
||||
|
||||
@@ -17,7 +17,7 @@ public partial record PlayerStats
|
||||
[Save("maximumVT")]
|
||||
public int MaximumVT { get; init; }
|
||||
[Save("currentExp")]
|
||||
public int CurrentExp { get; init; }
|
||||
public double CurrentExp { get; init; }
|
||||
[Save("currentLevel")]
|
||||
public int CurrentLevel { get; init; }
|
||||
[Save("currentAttack")]
|
||||
@@ -68,7 +68,7 @@ public class PlayerStatController
|
||||
public IAutoProp<int> CurrentDefense => _currentDefense;
|
||||
public IAutoProp<int> MaxDefense => _maxDefense;
|
||||
public IAutoProp<int> BonusDefense => _bonusDefense;
|
||||
public IAutoProp<int> CurrentExp => _currentExp;
|
||||
public IAutoProp<double> CurrentExp => _currentExp;
|
||||
public IAutoProp<int> ExpToNextLevel => _expToNextLevel;
|
||||
public IAutoProp<int> CurrentLevel => _currentLevel;
|
||||
public IAutoProp<double> Luck => _luck;
|
||||
@@ -91,7 +91,7 @@ public class PlayerStatController
|
||||
{
|
||||
_maximumVT.OnNext(newValue);
|
||||
}
|
||||
public void SetCurrentExp(int newValue)
|
||||
public void SetCurrentExp(double newValue)
|
||||
{
|
||||
_currentExp.OnNext(newValue);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public class PlayerStatController
|
||||
private readonly AutoProp<int> _maximumHP = new(-1);
|
||||
private readonly AutoProp<int> _currentVT = new(-1);
|
||||
private readonly AutoProp<int> _maximumVT = new(-1);
|
||||
private readonly AutoProp<int> _currentExp = new(-1);
|
||||
private readonly AutoProp<double> _currentExp = new(-1);
|
||||
private readonly AutoProp<int> _currentLevel = new(-1);
|
||||
private readonly AutoProp<int> _currentAttack = new(-1);
|
||||
private readonly AutoProp<int> _bonusAttack = new(-1);
|
||||
|
||||
Reference in New Issue
Block a user