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

    Represents a trajectory for ray-casting or lasers.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    age: number = 0

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

    angle: number
    color: string = "#000"
    delta: number = 4
    drawevery: number = 1
    game: Game

    The game instance.

    hidden: boolean = false
    length: number = 2000
    map: GameMap
    maxAge?: number

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

    points: TrajectoryPoint[] = []
    possibleTargets: GameObject[] = []
    thickness: number = 2
    tile?: Tile
    width: number = 0
    x: number = 0
    y: number = 0

    Methods

    • Draws the trajectory.

      Parameters

      • context: CanvasRenderingContext2D

        The context.

      Returns void