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

    Represents a Hill in King of the Hill mode.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    age: number = 0

    time (in milliseconds) for how long the object already exists in the game

    color: string

    Base color.

    flag?: Flag

    The flag belonging to this base.

    game: Game

    The game instance.

    maxAge?: number

    optional duration in milliseconds for how long the object should still exist in the game

    size: number = 80

    Base size.

    team?: Team

    The team owning the base.

    tile?: Tile
    width: number = 0
    x: number = 0
    y: number = 0

    Methods

    • Draws the base.

      Parameters

      • context: CanvasRenderingContext2D

        The context.

      Returns void

    • Checks if the base currently holds its flag.

      Returns boolean

      True if the flag is in the base.

    • Updates the hill state, checking for capture.

      Parameters

      • _dt: number

      Returns void