Home Reference Source
import controllers from 'mapbox-plugins/src/controller.js'
public class | source

controllers

Static Method Summary

Static Public Methods
public static

addRobots(num: *): *

Add AI robots shooting at player..

public static

bulletCalculator(drones: *)

Calculate bullets location based on drones.

public static

dashBoard(drone: *, ele: *)

Dashboard bind with a drone instance and div element...

public static

featureList(containerId: *): *

create refreshable features list.

public static

gameControl(drone: *)

GameController bind with a drone instance..

public static

pickupControl(canvasOverlay: *)

pickupObj control, need to bind with canvasOverlay, to fetch the objs drawn each moveEnd, rebuild the pixList depend on objs in viewport! pixList's index is vital for pickUp performance.

Static Public Methods

public static addRobots(num: *): * source

Add AI robots shooting at player..

Params:

NameTypeAttributeDescription
num *

Return:

*

public static bulletCalculator(drones: *) source

Calculate bullets location based on drones.

Params:

NameTypeAttributeDescription
drones *

public static dashBoard(drone: *, ele: *) source

Dashboard bind with a drone instance and div element... After start this controller, use WSAD to move drone.

Params:

NameTypeAttributeDescription
drone *
ele *

public static featureList(containerId: *): * source

create refreshable features list.

Params:

NameTypeAttributeDescription
containerId *

Return:

*

public static gameControl(drone: *) source

GameController bind with a drone instance.. After start this controller, use WSAD to move drone.

Params:

NameTypeAttributeDescription
drone *

public static pickupControl(canvasOverlay: *) source

pickupObj control, need to bind with canvasOverlay, to fetch the objs drawn each moveEnd, rebuild the pixList depend on objs in viewport! pixList's index is vital for pickUp performance.

Params:

NameTypeAttributeDescription
canvasOverlay *