CTFTNKS Project Documentation - v1.3.0
    Preparing search index...

    Class KingOfTheHill

    King of the Hill game mode.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    bases: Hill[] = []
    BaseSpawnDistance: number = 2

    Distance (in tiles) from the base center where players should spawn. A value of 2-3 ensures they don't spawn directly on the flag.

    game: Game

    The game instance.

    name: string = "defaultmode"

    Internal identifier for the game mode.

    Methods

    • Adapts bot speed based on team balance.

      Parameters

      • players: Player[]

        The list of players including the bots of whom to adapt the speed

      • team: Team | null

        The team to adjust for (usually the leading team gets harder bots?).

      • val: number = 0.1

        The adaptation intensity.

      Returns void

    • Called every game step.

      Parameters

      • _dt: number

        The time elapsed since the last frame in milliseconds.

      Returns void