// on new bullet from server on event bullet this.socket.on("bullet", (bullet: IBulletData) => { // add bullet to enemy bullets group this.enemyBullets.fireBullet(this, bullet) })