Open CRaph0705 opened 9 months ago
for each unit, initialize a boolean isDead to false.
function get and set this property isDead
pseudo code : if (this.hp <= 0) { this.hp = 0; this.isDead = false }
button on each unit to set hp to 0 and set boolean isDead to true.
for each unit, initialize a boolean isDead to false.
function get and set this property isDead
pseudo code : if (this.hp <= 0) { this.hp = 0; this.isDead = false }
button on each unit to set hp to 0 and set boolean isDead to true.