mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Renamed ExampleScene to ExampleLayer.
This commit is contained in:
parent
6342ed949e
commit
d67191d653
@ -3,14 +3,13 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "ExampleScene.h"
|
#include "ExampleLayer.h"
|
||||||
#include "AppMacros.h"
|
#include "AppMacros.h"
|
||||||
|
|
||||||
USING_NS_CC;
|
USING_NS_CC;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
AppDelegate::AppDelegate () {
|
AppDelegate::AppDelegate () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AppDelegate::~AppDelegate () {
|
AppDelegate::~AppDelegate () {
|
||||||
@ -58,8 +57,7 @@ bool AppDelegate::applicationDidFinishLaunching () {
|
|||||||
|
|
||||||
director->setDisplayStats(true);
|
director->setDisplayStats(true);
|
||||||
director->setAnimationInterval(1.0 / 60);
|
director->setAnimationInterval(1.0 / 60);
|
||||||
CCScene *pScene = ExampleScene::scene();
|
director->runWithScene(ExampleLayer::scene());
|
||||||
director->runWithScene(pScene);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "ExampleScene.h"
|
#include "ExampleLayer.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
@ -6,13 +6,13 @@ using namespace cocos2d;
|
|||||||
using namespace spine;
|
using namespace spine;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
CCScene* ExampleScene::scene () {
|
CCScene* ExampleLayer::scene () {
|
||||||
CCScene *scene = CCScene::create();
|
CCScene *scene = CCScene::create();
|
||||||
scene->addChild(ExampleScene::create());
|
scene->addChild(ExampleLayer::create());
|
||||||
return scene;
|
return scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ExampleScene::init () {
|
bool ExampleLayer::init () {
|
||||||
if (!CCLayer::init()) return false;
|
if (!CCLayer::init()) return false;
|
||||||
|
|
||||||
atlas = new Atlas("spineboy.txt");
|
atlas = new Atlas("spineboy.txt");
|
||||||
@ -32,7 +32,7 @@ bool ExampleScene::init () {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExampleScene::~ExampleScene () {
|
ExampleLayer::~ExampleLayer () {
|
||||||
delete atlas;
|
delete atlas;
|
||||||
delete skeletonData;
|
delete skeletonData;
|
||||||
delete animation;
|
delete animation;
|
||||||
@ -1,10 +1,10 @@
|
|||||||
#ifndef _EXAMPLESCENE_H_
|
#ifndef _EXAMPLELAYER_H_
|
||||||
#define _EXAMPLESCENE_H_
|
#define _EXAMPLELAYER_H_
|
||||||
|
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include <spine-cocos2dx/spine.h>
|
#include <spine-cocos2dx/spine.h>
|
||||||
|
|
||||||
class ExampleScene: public cocos2d::CCLayer {
|
class ExampleLayer: public cocos2d::CCLayer {
|
||||||
private:
|
private:
|
||||||
spine::Atlas *atlas;
|
spine::Atlas *atlas;
|
||||||
spine::SkeletonData *skeletonData;
|
spine::SkeletonData *skeletonData;
|
||||||
@ -12,11 +12,11 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static cocos2d::CCScene* scene ();
|
static cocos2d::CCScene* scene ();
|
||||||
~ExampleScene ();
|
~ExampleLayer ();
|
||||||
|
|
||||||
virtual bool init ();
|
virtual bool init ();
|
||||||
|
|
||||||
CREATE_FUNC (ExampleScene);
|
CREATE_FUNC (ExampleLayer);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _EXAMPLESCENE_H_
|
#endif // _EXAMPLELAYER_H_
|
||||||
@ -14,7 +14,7 @@
|
|||||||
2FC812271700449A00A93590 /* iphone-retina in Resources */ = {isa = PBXBuildFile; fileRef = 2FC812251700449A00A93590 /* iphone-retina */; };
|
2FC812271700449A00A93590 /* iphone-retina in Resources */ = {isa = PBXBuildFile; fileRef = 2FC812251700449A00A93590 /* iphone-retina */; };
|
||||||
2FC812291700479600A93590 /* common in Resources */ = {isa = PBXBuildFile; fileRef = 2FC812281700479600A93590 /* common */; };
|
2FC812291700479600A93590 /* common in Resources */ = {isa = PBXBuildFile; fileRef = 2FC812281700479600A93590 /* common */; };
|
||||||
2FEE8527170030A20013E4C9 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE8522170030A20013E4C9 /* AppDelegate.cpp */; };
|
2FEE8527170030A20013E4C9 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE8522170030A20013E4C9 /* AppDelegate.cpp */; };
|
||||||
2FEE8528170030A20013E4C9 /* ExampleScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE8525170030A20013E4C9 /* ExampleScene.cpp */; };
|
2FEE8528170030A20013E4C9 /* ExampleLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE8525170030A20013E4C9 /* ExampleLayer.cpp */; };
|
||||||
2FEE85931700331D0013E4C9 /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE858D1700331D0013E4C9 /* Atlas.cpp */; };
|
2FEE85931700331D0013E4C9 /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE858D1700331D0013E4C9 /* Atlas.cpp */; };
|
||||||
2FEE85941700331D0013E4C9 /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE858E1700331D0013E4C9 /* AtlasAttachmentLoader.cpp */; };
|
2FEE85941700331D0013E4C9 /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE858E1700331D0013E4C9 /* AtlasAttachmentLoader.cpp */; };
|
||||||
2FEE85951700331D0013E4C9 /* CCSkeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE858F1700331D0013E4C9 /* CCSkeleton.cpp */; };
|
2FEE85951700331D0013E4C9 /* CCSkeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FEE858F1700331D0013E4C9 /* CCSkeleton.cpp */; };
|
||||||
@ -78,8 +78,8 @@
|
|||||||
2FEE8522170030A20013E4C9 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
|
2FEE8522170030A20013E4C9 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
|
||||||
2FEE8523170030A20013E4C9 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
2FEE8523170030A20013E4C9 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||||
2FEE8524170030A20013E4C9 /* AppMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppMacros.h; sourceTree = "<group>"; };
|
2FEE8524170030A20013E4C9 /* AppMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppMacros.h; sourceTree = "<group>"; };
|
||||||
2FEE8525170030A20013E4C9 /* ExampleScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExampleScene.cpp; sourceTree = "<group>"; };
|
2FEE8525170030A20013E4C9 /* ExampleLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExampleLayer.cpp; sourceTree = "<group>"; };
|
||||||
2FEE8526170030A20013E4C9 /* ExampleScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleScene.h; sourceTree = "<group>"; };
|
2FEE8526170030A20013E4C9 /* ExampleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleLayer.h; sourceTree = "<group>"; };
|
||||||
2FEE8586170033180013E4C9 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Atlas.h; path = "../../include/spine-cocos2dx/Atlas.h"; sourceTree = "<group>"; };
|
2FEE8586170033180013E4C9 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Atlas.h; path = "../../include/spine-cocos2dx/Atlas.h"; sourceTree = "<group>"; };
|
||||||
2FEE8587170033180013E4C9 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtlasAttachmentLoader.h; path = "../../include/spine-cocos2dx/AtlasAttachmentLoader.h"; sourceTree = "<group>"; };
|
2FEE8587170033180013E4C9 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtlasAttachmentLoader.h; path = "../../include/spine-cocos2dx/AtlasAttachmentLoader.h"; sourceTree = "<group>"; };
|
||||||
2FEE8588170033180013E4C9 /* CCSkeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCSkeleton.h; path = "../../include/spine-cocos2dx/CCSkeleton.h"; sourceTree = "<group>"; };
|
2FEE8588170033180013E4C9 /* CCSkeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCSkeleton.h; path = "../../include/spine-cocos2dx/CCSkeleton.h"; sourceTree = "<group>"; };
|
||||||
@ -343,8 +343,8 @@
|
|||||||
2FEE8522170030A20013E4C9 /* AppDelegate.cpp */,
|
2FEE8522170030A20013E4C9 /* AppDelegate.cpp */,
|
||||||
2FEE8523170030A20013E4C9 /* AppDelegate.h */,
|
2FEE8523170030A20013E4C9 /* AppDelegate.h */,
|
||||||
2FEE8524170030A20013E4C9 /* AppMacros.h */,
|
2FEE8524170030A20013E4C9 /* AppMacros.h */,
|
||||||
2FEE8525170030A20013E4C9 /* ExampleScene.cpp */,
|
2FEE8525170030A20013E4C9 /* ExampleLayer.cpp */,
|
||||||
2FEE8526170030A20013E4C9 /* ExampleScene.h */,
|
2FEE8526170030A20013E4C9 /* ExampleLayer.h */,
|
||||||
);
|
);
|
||||||
name = Classes;
|
name = Classes;
|
||||||
path = ../Classes;
|
path = ../Classes;
|
||||||
@ -457,7 +457,7 @@
|
|||||||
BF4DE6AD138BB89600CF907D /* RootViewController.mm in Sources */,
|
BF4DE6AD138BB89600CF907D /* RootViewController.mm in Sources */,
|
||||||
D4ABB4B313B4395300552E6E /* main.mm in Sources */,
|
D4ABB4B313B4395300552E6E /* main.mm in Sources */,
|
||||||
2FEE8527170030A20013E4C9 /* AppDelegate.cpp in Sources */,
|
2FEE8527170030A20013E4C9 /* AppDelegate.cpp in Sources */,
|
||||||
2FEE8528170030A20013E4C9 /* ExampleScene.cpp in Sources */,
|
2FEE8528170030A20013E4C9 /* ExampleLayer.cpp in Sources */,
|
||||||
2FEE85931700331D0013E4C9 /* Atlas.cpp in Sources */,
|
2FEE85931700331D0013E4C9 /* Atlas.cpp in Sources */,
|
||||||
2FEE85941700331D0013E4C9 /* AtlasAttachmentLoader.cpp in Sources */,
|
2FEE85941700331D0013E4C9 /* AtlasAttachmentLoader.cpp in Sources */,
|
||||||
2FEE85951700331D0013E4C9 /* CCSkeleton.cpp in Sources */,
|
2FEE85951700331D0013E4C9 /* CCSkeleton.cpp in Sources */,
|
||||||
|
|||||||
@ -156,7 +156,7 @@
|
|||||||
<ClInclude Include="..\..\include\spine-cocos2dx\spine.h" />
|
<ClInclude Include="..\..\include\spine-cocos2dx\spine.h" />
|
||||||
<ClInclude Include="..\Classes\AppDelegate.h" />
|
<ClInclude Include="..\Classes\AppDelegate.h" />
|
||||||
<ClInclude Include="..\Classes\AppMacros.h" />
|
<ClInclude Include="..\Classes\AppMacros.h" />
|
||||||
<ClInclude Include="..\Classes\ExampleScene.h" />
|
<ClInclude Include="..\Classes\ExampleLayer.h" />
|
||||||
<ClInclude Include="main.h" />
|
<ClInclude Include="main.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -183,7 +183,7 @@
|
|||||||
<ClCompile Include="..\..\src\spine-cocos2dx\Skeleton.cpp" />
|
<ClCompile Include="..\..\src\spine-cocos2dx\Skeleton.cpp" />
|
||||||
<ClCompile Include="..\..\src\spine-cocos2dx\SkeletonJson.cpp" />
|
<ClCompile Include="..\..\src\spine-cocos2dx\SkeletonJson.cpp" />
|
||||||
<ClCompile Include="..\Classes\AppDelegate.cpp" />
|
<ClCompile Include="..\Classes\AppDelegate.cpp" />
|
||||||
<ClCompile Include="..\Classes\ExampleScene.cpp" />
|
<ClCompile Include="..\Classes\ExampleLayer.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -24,9 +24,6 @@
|
|||||||
<ClInclude Include="main.h">
|
<ClInclude Include="main.h">
|
||||||
<Filter>win32</Filter>
|
<Filter>win32</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\Classes\ExampleScene.h">
|
|
||||||
<Filter>Classes</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\Classes\AppDelegate.h">
|
<ClInclude Include="..\Classes\AppDelegate.h">
|
||||||
<Filter>Classes</Filter>
|
<Filter>Classes</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -126,14 +123,14 @@
|
|||||||
<ClInclude Include="..\..\include\spine-cocos2dx\RegionAttachment.h">
|
<ClInclude Include="..\..\include\spine-cocos2dx\RegionAttachment.h">
|
||||||
<Filter>Classes\spine-cocos2dx</Filter>
|
<Filter>Classes\spine-cocos2dx</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Classes\ExampleLayer.h">
|
||||||
|
<Filter>Classes</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="main.cpp">
|
<ClCompile Include="main.cpp">
|
||||||
<Filter>win32</Filter>
|
<Filter>win32</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Classes\ExampleScene.cpp">
|
|
||||||
<Filter>Classes</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\Classes\AppDelegate.cpp">
|
<ClCompile Include="..\Classes\AppDelegate.cpp">
|
||||||
<Filter>Classes</Filter>
|
<Filter>Classes</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -203,6 +200,9 @@
|
|||||||
<ClCompile Include="..\..\src\spine-cocos2dx\CCSkeleton.cpp">
|
<ClCompile Include="..\..\src\spine-cocos2dx\CCSkeleton.cpp">
|
||||||
<Filter>Classes\spine-cocos2dx</Filter>
|
<Filter>Classes\spine-cocos2dx</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Classes\ExampleLayer.cpp">
|
||||||
|
<Filter>Classes</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\spine-cpp\src\json\json_valueiterator.inl">
|
<None Include="..\..\..\spine-cpp\src\json\json_valueiterator.inl">
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public:
|
|||||||
AnimationState *state;
|
AnimationState *state;
|
||||||
bool debug;
|
bool debug;
|
||||||
|
|
||||||
static CCSkeleton* CCSkeleton::create (SkeletonData* skeletonData);
|
static CCSkeleton* create (SkeletonData* skeletonData);
|
||||||
CCSkeleton (SkeletonData *skeletonData, AnimationStateData *stateData = 0);
|
CCSkeleton (SkeletonData *skeletonData, AnimationStateData *stateData = 0);
|
||||||
virtual ~CCSkeleton ();
|
virtual ~CCSkeleton ();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user