Type alias Collision

Collision: {
    isColliding: {
        char?: {
            [k: string]: boolean;
        };
        rect?: {
            black?: boolean;
            blue?: boolean;
            cyan?: boolean;
            green?: boolean;
            light_black?: boolean;
            light_blue?: boolean;
            light_cyan?: boolean;
            light_green?: boolean;
            light_purple?: boolean;
            light_red?: boolean;
            light_yellow?: boolean;
            purple?: boolean;
            red?: boolean;
            transparent?: boolean;
            white?: boolean;
            yellow?: boolean;
        };
        text?: {
            [k: string]: boolean;
        };
    };
}

A return value type for collision detection.

  • isColliding.char is used to test a collision to specific character. e.g. isColliding.char.f
  • isColliding.rect is used to test a collision to specific color rects. e.g. isColliding.rect.blue
  • isColliding.text is used to test a collision to specific text. e.g. isColliding.text.e

Type declaration

  • isColliding: {
        char?: {
            [k: string]: boolean;
        };
        rect?: {
            black?: boolean;
            blue?: boolean;
            cyan?: boolean;
            green?: boolean;
            light_black?: boolean;
            light_blue?: boolean;
            light_cyan?: boolean;
            light_green?: boolean;
            light_purple?: boolean;
            light_red?: boolean;
            light_yellow?: boolean;
            purple?: boolean;
            red?: boolean;
            transparent?: boolean;
            white?: boolean;
            yellow?: boolean;
        };
        text?: {
            [k: string]: boolean;
        };
    }
    • Optional char?: {
          [k: string]: boolean;
      }
      • [k: string]: boolean
    • Optional rect?: {
          black?: boolean;
          blue?: boolean;
          cyan?: boolean;
          green?: boolean;
          light_black?: boolean;
          light_blue?: boolean;
          light_cyan?: boolean;
          light_green?: boolean;
          light_purple?: boolean;
          light_red?: boolean;
          light_yellow?: boolean;
          purple?: boolean;
          red?: boolean;
          transparent?: boolean;
          white?: boolean;
          yellow?: boolean;
      }
      • Optional black?: boolean
      • Optional blue?: boolean
      • Optional cyan?: boolean
      • Optional green?: boolean
      • Optional light_black?: boolean
      • Optional light_blue?: boolean
      • Optional light_cyan?: boolean
      • Optional light_green?: boolean
      • Optional light_purple?: boolean
      • Optional light_red?: boolean
      • Optional light_yellow?: boolean
      • Optional purple?: boolean
      • Optional red?: boolean
      • Optional transparent?: boolean
      • Optional white?: boolean
      • Optional yellow?: boolean
    • Optional text?: {
          [k: string]: boolean;
      }
      • [k: string]: boolean

Generated using TypeDoc