Class cc.LoaderScene

Class Summary
Constructor Attributes Constructor Name and Description
 
Used to display the loading screen

Method Summary

Class Detail

cc.LoaderScene()
Used to display the loading screen

Method Detail

  • ctor()
    Constructor
  • initWithResources(resources, selector, target)
    init with resources
    Parameters:
    {Array} resources
    {Function|String} selector
    {Object} target
  • <static> {cc.LoaderScene} cc.LoaderScene.preload(resources, selector, target)
    Preload multi scene resources.
    //example
    var g_mainmenu = [
       {src:"res/hello.png"},
       {src:"res/hello.plist"},
    
       {src:"res/logo.png"},
       {src:"res/btn.png"},
    
       {src:"res/boom.mp3"},
    ]
    
    var g_level = [
       {src:"res/level01.png"},
       {src:"res/level02.png"},
       {src:"res/level03.png"}
    ]
    
    //load a list of resources
    cc.LoaderScene.preload(g_mainmenu, this.startGame, this);
    
    //load multi lists of resources
    cc.LoaderScene.preload([g_mainmenu,g_level], this.startGame, this);
    Parameters:
    {Array} resources
    {Function|String} selector
    {Object} target
    Returns:
    {cc.LoaderScene}