Cocos Creator API

1.0.0

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

ValueType

The base class of all value types.

Methods

clone ( ) ValueType

This method returns an exact copy of current value.

returns:

type: ValueType

equals
(
  • other
)
Boolean

Compares this object with the other one.

name type description
other ValueType

returns:

type: Boolean

toString ( ) string

TODO

returns:

type: string

lerp
(
  • to
  • ratio
)
ValueType

Linearly interpolates between this value to to value by ratio which is in the range [0, 1]. When ratio = 0 returns this. When ratio = 1 return to. When ratio = 0.5 returns the average of this and to.

name type description
to ValueType

the to value

ratio number

the interpolation coefficient

returns:

type: ValueType

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index