Add more floors, light refactoring
This commit is contained in:
@@ -24,6 +24,20 @@ public interface IPlayer : IKillable
|
||||
|
||||
public void TeleportPlayer(Vector3 newPosition);
|
||||
|
||||
public void HealHP(int amount);
|
||||
|
||||
public void RaiseHP(int amount);
|
||||
|
||||
public void HealVT(int amount);
|
||||
|
||||
public void RaiseVT(int amount);
|
||||
|
||||
public void RaiseBonusAttack(int amount);
|
||||
|
||||
public void RaiseBonusDefense(int amount);
|
||||
|
||||
public void RaiseBonusLuck(int amount);
|
||||
|
||||
public IInventory Inventory { get; }
|
||||
|
||||
public PlayerStats Stats { get; }
|
||||
|
||||
@@ -162,7 +162,6 @@ public partial class Player : CharacterBody3D, IPlayer
|
||||
this.Provide();
|
||||
PlayerLogic.Start();
|
||||
HealthTimer.Timeout += OnHealthTimerTimeout;
|
||||
Inventory.AccessoryUnequipped += Inventory_AccessoryUnequipped;
|
||||
Hitbox.AreaEntered += Hitbox_AreaEntered;
|
||||
}
|
||||
|
||||
@@ -193,6 +192,52 @@ public partial class Player : CharacterBody3D, IPlayer
|
||||
EmitSignal(SignalName.PauseButtonPressed);
|
||||
}
|
||||
|
||||
public void RaiseHP(int amountToRaise)
|
||||
{
|
||||
Stats.SetMaximumHP(Stats.MaximumHP.Value + amountToRaise);
|
||||
Stats.SetCurrentHP(Stats.MaximumHP.Value);
|
||||
Game.AnnounceMessageOnInventoryScreen($"{amountToRaise}MAXHP Up.");
|
||||
}
|
||||
|
||||
public void HealHP(int amountToRestore)
|
||||
{
|
||||
Stats.SetCurrentHP(Stats.CurrentHP.Value + amountToRestore);
|
||||
var raiseString = amountToRestore == 1000 ? "MAX" : $"{amountToRestore}";
|
||||
Game.AnnounceMessageOnInventoryScreen($"{raiseString}HP Restored.");
|
||||
}
|
||||
|
||||
public void RaiseVT(int amountToRaise)
|
||||
{
|
||||
if (Stats.CurrentVT.Value == Stats.MaximumVT.Value)
|
||||
{
|
||||
Stats.SetMaximumVT(Stats.MaximumVT.Value + amountToRaise);
|
||||
Stats.SetCurrentVT(Stats.MaximumVT.Value);
|
||||
Game.AnnounceMessageOnInventoryScreen($"{amountToRaise}MAXVT Up.");
|
||||
}
|
||||
}
|
||||
|
||||
public void HealVT(int amountToRestore)
|
||||
{
|
||||
Stats.SetCurrentVT(Stats.CurrentVT.Value + amountToRestore);
|
||||
var raiseString = amountToRestore == 1000 ? "MAX" : $"{amountToRestore}";
|
||||
Game.AnnounceMessageOnInventoryScreen($"{raiseString}VT Restored.");
|
||||
}
|
||||
|
||||
public void RaiseBonusAttack(int amount)
|
||||
{
|
||||
Stats.SetBonusAttack(Stats.BonusAttack.Value + amount);
|
||||
}
|
||||
|
||||
public void RaiseBonusDefense(int amount)
|
||||
{
|
||||
Stats.SetBonusDefense(Stats.BonusDefense.Value + amount);
|
||||
}
|
||||
|
||||
public void RaiseBonusLuck(int amount)
|
||||
{
|
||||
Stats.SetLuck(amount);
|
||||
}
|
||||
|
||||
public void Move(float delta)
|
||||
{
|
||||
var rawInput = GlobalInputVector;
|
||||
|
||||
Reference in New Issue
Block a user