Refactor Player class to use components, also use components in Enemy class types and fiddle with boss structure
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Game.Implementation.Components;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -18,38 +19,16 @@ public interface IPlayer : IKillable
|
||||
|
||||
public void Knockback(float impulse);
|
||||
|
||||
public void GainExp(double expGained);
|
||||
|
||||
public void LevelUp();
|
||||
|
||||
public void Move(float delta);
|
||||
|
||||
public void TeleportPlayer(Transform3D newTransform);
|
||||
|
||||
public void HealHP(int amount);
|
||||
|
||||
public void RaiseHP(int amount);
|
||||
|
||||
public void HealVT(int amount);
|
||||
|
||||
public void RaiseVT(int amount);
|
||||
|
||||
public void ModifyBonusAttack(int amount);
|
||||
|
||||
public void ModifyBonusDefense(int amount);
|
||||
|
||||
public void ModifyMaximumHP(int amount);
|
||||
|
||||
public void ModifyMaximumVT(int amount);
|
||||
|
||||
public void ModifyBonusLuck(double amount);
|
||||
|
||||
public void SetHealthTimerStatus(bool isActive);
|
||||
|
||||
public IInventory Inventory { get; }
|
||||
|
||||
public PlayerStats Stats { get; }
|
||||
|
||||
public Vector3 CurrentPosition { get; }
|
||||
|
||||
public Basis CurrentBasis { get; }
|
||||
@@ -63,4 +42,16 @@ public interface IPlayer : IKillable
|
||||
public void Equip(EquipableItem equipable);
|
||||
|
||||
public void Unequip(EquipableItem equipable);
|
||||
|
||||
public HealthComponent HealthComponent { get; }
|
||||
|
||||
public VTComponent VTComponent { get; }
|
||||
|
||||
public AttackComponent AttackComponent { get; }
|
||||
|
||||
public DefenseComponent DefenseComponent { get; }
|
||||
|
||||
public ExperiencePointsComponent ExperiencePointsComponent { get; }
|
||||
|
||||
public LuckComponent LuckComponent { get; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user