Skip to content

Commit

Permalink
feat: Reduce enemy respawn time frame
Browse files Browse the repository at this point in the history
We can reduce the respawn time range since enemies will respawn at spots
that are offscreen, so that will add some time for them to get "on" the
map.
  • Loading branch information
joshuacurtiss committed Aug 3, 2024
1 parent e6846d5 commit 7ad2766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objects/Enemy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function enemy(options: Partial<EnemyCompOpt> = {}): EnemyComp {
play('enemy_squash', { volume: getVol(DATA_SFX_VOL) });
this.trigger(ON_SQUASH, this);
wait(0.5, ()=>this.pos = vec2(-50));
wait(randi(8, 20), ()=>{
wait(randi(8, 15), ()=>{
this.setAnim(vec2(0));
this.pos = opt.pos.clone();
this.unfreeze();
Expand Down

0 comments on commit 7ad2766

Please sign in to comment.