entity changes, classes
This commit is contained in:
parent
bda2b88796
commit
8bd4aedcf9
20 changed files with 1917 additions and 27 deletions
|
|
@ -6,12 +6,18 @@ public class PlayerEntity : Entity
|
|||
[Header("Player Flags")]
|
||||
public int actions = 2;
|
||||
public int maxActions = 2;
|
||||
public enum PlayerClass {Ranker, Caster, Officer, Engineer, Medic}
|
||||
public PlayerClass selectedClass = PlayerClass.Ranker;
|
||||
[Header("Weaponry")]
|
||||
[SerializeField] private Weapon[] weapons;
|
||||
[HideInInspector] public List<Weapon> weaponInstances = new();
|
||||
public Weapon currentWeapon;
|
||||
[Header("OfficerAbilities")]
|
||||
[SerializeField] private OfficerAbilities officerAbility;
|
||||
[HideInInspector] public OfficerAbilities officerInstance;
|
||||
[Header("UI")]
|
||||
[SerializeField] private Transform hpBar;
|
||||
public GameObject debugDoneObject;
|
||||
void Start()
|
||||
{
|
||||
foreach (Weapon weapon in weapons)
|
||||
|
|
@ -21,6 +27,12 @@ public class PlayerEntity : Entity
|
|||
newWeapon.tag = tag;
|
||||
weaponInstances.Add(newWeapon);
|
||||
}
|
||||
|
||||
if (selectedClass == PlayerClass.Officer)
|
||||
{
|
||||
officerInstance = Instantiate(officerAbility, transform);
|
||||
officerInstance.thisEntity = this;
|
||||
}
|
||||
currentWeapon = weaponInstances[0];
|
||||
}
|
||||
|
||||
|
|
@ -30,9 +42,9 @@ public class PlayerEntity : Entity
|
|||
|
||||
}
|
||||
|
||||
public override void TakeDamage(float amount)
|
||||
public override void TakeDamage(float amount, Entity attacker)
|
||||
{
|
||||
base.TakeDamage(amount);
|
||||
base.TakeDamage(amount, attacker);
|
||||
UpdateHealthUI();
|
||||
}
|
||||
public void UpdateHealthUI()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue