mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
NPCs now spawn facing a random direction and with slightly varying speed
This commit is contained in:
parent
af915279a8
commit
581a3c0742
1 changed files with 2 additions and 1 deletions
|
@ -114,8 +114,9 @@ public class Npc extends Entity {
|
|||
this.weaknesses = config.getWeaknesses();
|
||||
this.animations = config.getAnimations();
|
||||
this.behaviorTree = SequenceBehavior.createBehaviorTree(this, behavior);
|
||||
this.direction = Math.random() < 0.5 ? FacingDirection.WEST : FacingDirection.EAST;
|
||||
health = maxHealth;
|
||||
speed = baseSpeed;
|
||||
speed = baseSpeed * (float)(0.9 + Math.random() * 0.2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue