updated sketch
This commit is contained in:
parent
6966bf3933
commit
c1045464ac
@ -102,9 +102,9 @@ public class Cannon extends Entity {
|
|||||||
public void onBulletHit(Team hit_team) {
|
public void onBulletHit(Team hit_team) {
|
||||||
if (hit_team.isNeutral) return;
|
if (hit_team.isNeutral) return;
|
||||||
|
|
||||||
if (hit_team == team) {
|
if (hit_team == team && health < 1) {
|
||||||
health = Math.min(1, health + HEALTH_REGEN_PER_HIT);
|
health = Math.min(1, health + HEALTH_REGEN_PER_HIT);
|
||||||
} else {
|
} else if (hit_team != team) {
|
||||||
health = Math.max(0, health - HEALTH_REGEN_PER_HIT);
|
health = Math.max(0, health - HEALTH_REGEN_PER_HIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
BIN
data/cannon_sketch.png
Normal file
BIN
data/cannon_sketch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue
Block a user