new Level()
Represents a level in the game, containing enemies, clouds, background objects,
and collectible items such as bottles and coins.
- Source:
Members
backroundObjeckt :Array.<BackgroundObjekt>
Array of background objects in the level.
Type:
- Array.<BackgroundObjekt>
- Source:
clouds :Array.<Cloud>
Array of clouds in the level.
Type:
- Array.<Cloud>
- Source:
collectiblBottel :Array.<CollectiblBottel>
Array of collectible bottles in the level.
Type:
- Array.<CollectiblBottel>
- Source:
collectiblCoin :Array.<CollectiblCoin>
Array of collectible coins in the level.
Type:
- Array.<CollectiblCoin>
- Source:
enemies :Array.<Enemy>
Array of enemies in the level.
Type:
- Array.<Enemy>
- Source:
initialCollectiblesBottles :Array.<CollectiblBottel>
The initial state of collectible bottles.
Type:
- Array.<CollectiblBottel>
- Source:
initialCollectiblesCoins :Array.<CollectiblCoin>
The initial state of collectible coins.
Type:
- Array.<CollectiblCoin>
- Source:
level_end_x :number
The x-coordinate representing the end of the level.
Type:
- number
- Source:
Methods
repetBackround()
Populates the background with repeated images to create a scrolling effect.
It alternates between two variants for each background layer.
- Source:
resetCollectibles()
Resets the collectible items (bottles and coins) to their initial state,
restoring positions and statuses as needed.
- Source: