mirror of https://github.com/axmolengine/axmol.git
issue #5, add CCScene
This commit is contained in:
parent
5eed1eee76
commit
8951d0133b
|
@ -24,6 +24,8 @@ THE SOFTWARE.
|
|||
|
||||
#include "CCAtlasNode.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
ccColor3B CCAtlasNode::getColor(void)
|
||||
{
|
||||
if(m_bOpacityModifyRGB)
|
||||
|
|
|
@ -27,46 +27,38 @@ THE SOFTWARE.
|
|||
using namespace std;
|
||||
|
||||
CCNode::CCNode(void)
|
||||
{
|
||||
m_bIsRunning = false;
|
||||
m_fRotation = 0.0f;
|
||||
m_fScaleX = m_fScaleY = 1.0f;
|
||||
m_tPosition = CGPoint(0,0);
|
||||
m_tAnchorPointInPixels = m_tAnchorPoint = CGPoint(0,0);
|
||||
m_tContentSize = CGSize(0,0);
|
||||
|
||||
// "whole screen" objects. like Scenes and Layers, should set isRelativeAnchorPoint to false
|
||||
m_bIsRelativeAnchorPoint = true;
|
||||
m_bIsTransformDirty = m_bIsInverseDirty = true;
|
||||
|
||||
#ifdef CCX_NODE_TRANSFORM_USING_AFFINE_MATRIX
|
||||
m_bIsTransformGLDirty = true;
|
||||
#endif
|
||||
|
||||
m_fVertexZ = 0.0f;
|
||||
|
||||
// m_pGrid = NULL;
|
||||
|
||||
m_bIsVisible = true;
|
||||
|
||||
m_iTag = kCCNodeTagInvalid;
|
||||
|
||||
m_iZOrder = 0;
|
||||
|
||||
// lazy alloc
|
||||
m_pCamera = NULL;
|
||||
|
||||
// children (lazy allocs)
|
||||
m_pChildren = NULL;
|
||||
|
||||
// userData is always inited as nil
|
||||
m_pUserData = NULL;
|
||||
}
|
||||
:m_bIsRunning(false)
|
||||
,m_fRotation(0.0f)
|
||||
,m_fScaleX(1.0f)
|
||||
,m_fScaleY(1.0f)
|
||||
,m_tPosition(CGPoint(0,0))
|
||||
,m_tAnchorPointInPixels(CGPoint(0,0))
|
||||
,m_tAnchorPoint(CGPoint(0,0))
|
||||
,m_tContentSize(CGSize(0,0))
|
||||
// "whole screen" objects. like Scenes and Layers, should set isRelativeAnchorPoint to false
|
||||
,m_bIsRelativeAnchorPoint(true)
|
||||
,m_bIsTransformDirty(true)
|
||||
,m_bIsInverseDirty(true)
|
||||
#ifdef CCX_NODE_TRANSFORM_USING_AFFINE_MATRIX
|
||||
,m_bIsTransformGLDirty(true)
|
||||
#endif
|
||||
,m_fVertexZ(0.0f)
|
||||
,m_pGrid(NULL)
|
||||
,m_bIsVisible(true)
|
||||
,m_iTag(kCCNodeTagInvalid)
|
||||
,m_iZOrder(0)
|
||||
// lazy alloc
|
||||
,m_pCamera(NULL)
|
||||
// children (lazy allocs)
|
||||
,m_pChildren(NULL)
|
||||
// userData is always inited as nil
|
||||
,m_pUserData(NULL)
|
||||
{}
|
||||
|
||||
/*initialize*/
|
||||
bool CCNode::init(void)
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
float CCNode::getRotation()
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCSCENE_H__
|
||||
#define __CCSCENE_H__
|
||||
|
||||
#include "CCNode.h"
|
||||
|
||||
class CCScene : public CCNode
|
||||
{
|
||||
public:
|
||||
CCScene();
|
||||
virtual ~CCScene();
|
||||
|
||||
/** initializes the scene */
|
||||
virtual bool init(void);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,33 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCScene.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool CCScene::init(void)
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
Loading…
Reference in New Issue