Class Cell

Cell is a block viruses and pills are made of

Hierarchy

  • Cell

Constructors

  • Creates a new Cell

    Parameters

    • pos: Vector

      Start position of the cell

    • color: CellColor

      The color of the cell

    • sprite: CellSprite

      The sprite of the cell (different for viruses and specific parts of the pill)

    • Optional pillReference: Pill

      The pill that this cell is a part of if any

    Returns Cell

Properties

color: CellColor
deleted: boolean = false
isVirus: boolean
landed: boolean = false
markedForXDeletion: boolean = false
markedForYDeletion: boolean = false
pillReference: Pill
pos: Vector
sprite: CellSprite

Methods

  • Moves the cell by a vector. Does not check for collisions!

    Parameters

    • vec: Vector

      The vector to move the cell by

    • isAnimation: boolean = false

      landed won't be set to false if this is true

    Returns void

  • Simply moves the cell down by one unit. Does not check for collisions!

    Returns void

Generated using TypeDoc