Class: Base

Base()

Easy基础类.

Constructor

new Base()

Properties:
Name Type Description
Map object 组件模板映射表
InstanceMap object 实例映射表
randomId object 随机ID记录器
Source:

Methods

(static) create(className, extraProp) → {BaseContainer}

Create a instance from model
Parameters:
Name Type Description
className string model's name
extraProp object instance's prop
Source:
Returns:
Return a instance which designed by model
Type
BaseContainer

(static) define(className, prop)

Define a model
Parameters:
Name Type Description
className string model's name
prop object model's prop
Source:

(static) destroy(instance)

remove instance which has been given
Parameters:
Name Type Description
instance BaseContainer the instance want to destroy;
Source:

(static) getCmp(id) → {BaseContainer}

get a created instance
Parameters:
Name Type Description
id string className or ID
Source:
Returns:
A instance
Type
BaseContainer

(static) moveInterface()

create a movable display object
Parameters:
Type Description
PIXI.DisplayObject
Source:

(static) observable()

create a observable object
Parameters:
Type Description
object
Source:

(static) removeAll()

remove all instance except static instance
Source:

(static) removeAllAndStaitic()

remove all instance
Source:

(static) shakeContainer(stage, Num, dist, useTime) → {Promise}

a shake container animate
Parameters:
Name Type Description
stage object 摇晃的容器
Num number 摇晃次数默认3
dist number 摇晃距离
useTime number 单次摇晃时间
Source:
Returns:
Type
Promise