Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RawSprite<T>

A simple abstract Sprite

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • new RawSprite(shape: T, index?: number): RawSprite

Properties

Protected index

index: number

Order for sprite rendering

Protected shape

shape: T

Methods

collides

  • Checks if Sprite collides a specified Rectangle

    Parameters

    Returns boolean

    true only if provided Rectangle collides the Sprite

contains

  • contains(p: Point): boolean
  • contains(coordX: number, coordY: number): boolean

getIndex

  • getIndex(): number

getShape

  • getShape(): T

getX

  • getX(): number

getY

  • getY(): number

move

  • move(moveX: number, moveY: number): void
  • move(vect: Vector): void

moveTo

  • moveTo(coordX: number, coordY: number): void
  • moveTo(point: Point): any

Abstract render

  • render(context: CanvasRenderingContext2D): void

setIndex

  • setIndex(newIndex: number): void

Generated using TypeDoc