1 decade ago by TrexKikBut
Everytime I switch my weapons, it ends up glitching on EntityGrenade. Why is it doing this?
I'm following the book of HTML5 Game Development
I'm following the book of HTML5 Game Development
if( ig.input.pressed('switch') ) { this.weapon ++; if(this.weapon >= this.totalWeapons) this.weapon = 0; switch(this.weapon){ case(0): this.activeWeapon = "EntityBullet"; case(1): this.activeWeapon = "EntityBullet2"; case(2): this.activeWeapon = "EntityGrenade"; break; break; } this.setupAnimation(this.weapon);