Cocos Creator API

1.3.0

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

ContentStrategy

: cc

cc.ContentStrategy class is the root strategy class of content's scale strategy, it controls the behavior of how to scale the scene and setup the viewport for the game

preApply
(
  • view
)

Manipulation before applying the strategy

view View

The target view

apply
(
  • view
  • designedResolution
)
Object

Function to apply this strategy The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, The target view can then apply these value to itself, it's preferred not to modify directly its private variables

view View
designedResolution Size

:

: Object

scaleAndViewportRect

postApply
(
  • view
)

Manipulation after applying the strategy

view View

The target view

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