Class: TrophyRoswell

TrophyRoswell(enemyFleet)

Roswell Trophy - kill the UFO while other enemies remain

Constructor

new TrophyRoswell(enemyFleet)

Make the trophy instance.
Parameters:
Name Type Description
enemyFleet EnemyFleet The enemy fleet instance.
Properties:
Name Type Description
enemyFleet EnemyFleet The enemy fleet and ships
isActive boolean Is it active or been won
domElement Object The HTML DOM element
Author:
Source:

Methods

check() → {boolean}

Check if there is no UFO ship but still have enemy ships
Source:
To Do:
  • This is not efficient for what it is ...
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: