1 /****************************************************************************
  2  Copyright (c) 2008-2010 Ricardo Quesada
  3  Copyright (c) 2011-2012 cocos2d-x.org
  4  Copyright (c) 2013-2014 Chukong Technologies Inc.
  5 
  6  http://www.cocos2d-x.org
  7 
  8  Permission is hereby granted, free of charge, to any person obtaining a copy
  9  of this software and associated documentation files (the "Software"), to deal
 10  in the Software without restriction, including without limitation the rights
 11  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 12  copies of the Software, and to permit persons to whom the Software is
 13  furnished to do so, subject to the following conditions:
 14 
 15  The above copyright notice and this permission notice shall be included in
 16  all copies or substantial portions of the Software.
 17 
 18  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 19  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 20  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 21  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 22  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 23  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 24  THE SOFTWARE.
 25  ****************************************************************************/
 26 
 27 
 28 /**
 29  * <p>cc.Scene is a subclass of cc.Node that is used only as an abstract concept.</p>
 30  *  <p>cc.Scene an cc.Node are almost identical with the difference that cc.Scene has it's
 31  * anchor point (by default) at the center of the screen.</p>
 32  *
 33  * <p>For the moment cc.Scene has no other logic than that, but in future releases it might have
 34  * additional logic.</p>
 35  *
 36  * <p>It is a good practice to use and cc.Scene as the parent of all your nodes.</p>
 37  * @class
 38  * @extends cc.Node
 39  */
 40 cc.Scene = cc.Node.extend(/** @lends cc.Scene# */{
 41     /**
 42      * Constructor
 43      */
 44     _className:"Scene",
 45     ctor:function () {
 46         cc.Node.prototype.ctor.call(this);
 47         this._ignoreAnchorPointForPosition = true;
 48         this.setAnchorPoint(0.5, 0.5);
 49         this.setContentSize(cc.director.getWinSize());
 50     }
 51 });
 52 
 53 /**
 54  * creates a scene
 55  * @deprecated
 56  * @return {cc.Scene}
 57  * @example
 58  * // Example
 59  * var aScene = cc.Scene.create();
 60  * //OR
 61  * var aScene = new cc.Scene();
 62  */
 63 cc.Scene.create = function () {
 64     return new cc.Scene();
 65 };
 66