Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FadeOutInState

Hierarchy

Index

Constructors

constructor

  • new FadeOutInState(leavingState: State, enteringState: State, transitionLogic?: Function, timeMillis?: number): FadeOutInState
  • Fades one state out and another state in.

    constructor

    Parameters

    • leavingState: State
    • enteringState: State
    • Optional transitionLogic: Function
    • Optional timeMillis: number

    Returns FadeOutInState

Properties

Private _alpha

_alpha: any

Private _curTime

_curTime: any

Private _enteringState

_enteringState: any

Private _fadingOut

_fadingOut: any

Private _halfTime

_halfTime: any

Private _leavingState

_leavingState: any

Private _transitionLogic

_transitionLogic: any

game

game: Game

Methods

Private _setState

  • _setState(state: any): any
  • Sets the new game state. This is a hook for subclasses to perform extra logic.

    Parameters

    • state: any

      The new state.

    Returns any

init

  • init(): void
  • Called right before a state starts. Subclasses can do any needed initialization here.

    Returns void

leaving

  • leaving(game: any): void
  • Called when this state is being left for another one.

    Parameters

    • game: any

    Returns void

render

  • render(ctx: CanvasRenderingContext2D): void
  • Parameters

    • ctx: CanvasRenderingContext2D

    Returns void

update

  • update(delta: number): void
  • Parameters

    • delta: number

    Returns void

Generated using TypeDoc