Show:

annie.Point Class

Extends annie.AObject
Defined in: libs/Point.js:11
Module: annie

Available since 1.0.0

Item Index

Methods

Properties

Methods

destroy

() Void public

Inherited from annie.AObject: libs/EventDispatcher.js:55

Available since 2.0.0

销毁一个对象 销毁之前一定要做完其他善后工作,否则有可能会出错

Returns:

Void:

distance

(
  • args
)
Number static

Defined in libs/Point.js:53

求两点之间的距离

Parameters:

  • args Object

    可变参数 传两个参数的话就是两个annie.Point类型 传四个参数的话分别是两个点的x y x y

Returns:

Point

(
  • x
  • y
)
public

Defined in libs/Point.js:19

Available since 1.0.0

构造函数

Parameters:

Properties

instanceId

Number public

Inherited from annie.AObject: libs/EventDispatcher.js:23

Available since 1.0.0

每一个annie引擎对象都会有一个唯一的id码。

Example:

 //获取 annie引擎类对象唯一码
 console.log(this.instanceId);

instanceType

String public

Inherited from annie.AObject: libs/EventDispatcher.js:41

Available since 1.0.3

每一个annie类都有一个实例类型字符串,通过这个字符串,你能知道这个实例是从哪个类实例而来

x

Number public

Defined in libs/Point.js:31

Available since 1.0.0

水平坐标

y

Number public

Defined in libs/Point.js:39

Available since 1.0.0

垂直坐标