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

    Represents a fancy smoke circle on the map.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new Smoke particle.

      Parameters

      • game: Game

        The game instance.

      • x: number

        X coordinate.

      • y: number

        Y coordinate.

      • timeout: number = 300

        Lifetime in ms.

      • radius: number = 10

        Initial radius.

      • rspeed: number = 1

        Radius shrinking speed.

      Returns Smoke

    Properties

    age: number = 0

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

    color: string = "rgba(40, 40, 40, 0.3)"
    game: Game

    The game instance.

    maxAge?: number

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

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

    Methods

    • Draws the smoke particle.

      Parameters

      • context: CanvasRenderingContext2D

        The context.

      Returns void

    • Update method called every frame.

      Parameters

      • _dt: number

        The time elapsed since the last frame in milliseconds.

      Returns void