Class: TrophyKillstreak

TrophyKillstreak(game, bombFactory, droppedBy, id)

Killstreak Trophy - Get 10 kills in a row without taking damage or missing

Constructor

new TrophyKillstreak(game, bombFactory, droppedBy, id)

Make a new enemy bomb.
Parameters:
Name Type Description
game SpaceInvaders The current game instance.
bombFactory EnemyBombFactory The bomb factory that created this bomb.
droppedBy EnemyShip The enemy ship that dropped this bomb.
id string Unique HTML DOM id.
Properties:
Name Type Description
player Player The player
isActive boolean Is it active or been won
domElement Object The HTML DOM element
Author:
Source:

Methods

check() → {boolean}

Check the player killstreak value
Source:
Returns:
Type
boolean

giveToPlayer()

Give this trophy to the player, just sets the opacity but could do more.
Source:

update()

Update loop checks if this trophy has been won
Source: