Skip to content
Armin Jodat edited this page May 18, 2024 · 5 revisions

aa.engine.levels

our Levels section is a very important part of our game. The LevelManager class is a crucial component in our Android app responsible for managing game levels. It orchestrates various tasks related to level setup, job management, and gameplay mechanics. Let’s dive into the details:

aa.engine.LevelManager

1. Critical Job Setup:

  • The setupCriticalJobs() function initializes critical game jobs that directly impact gameplay. These include:
    • OrbitingJob: Manages orbiting behavior.
    • MoveUpJob: Handles upward movement.
    • SpawnJob: Controls spawning of game elements.
    • CollisionJob: Detects collisions.
    • WinJob: Determines win conditions.
    • OrbitDetectionJob: Detects orbiting events.

2. Optional Job Configuration:

  • The setupOptionalJobs() function allows customization by adding optional jobs specific to the current level. These jobs enhance gameplay or introduce unique mechanics.

3. Level Initialization:

  • The setup(level: Level) method sets up the level by configuring rotation speed, spawning speed, and critical and optional jobs.
  • It receives a Level object as input, which contains level-specific information.

4. Level Cleanup:

  • The clearLevel() method resets the level state by clearing jobs and other relevant data.
  • It ensures a clean slate for transitioning to a new level.

Clone this wiki locally