PuzzleSDK
SpineTest.h
浏览该文件的文档.
1/*******************************************************************************
2 * Copyright (c) 2013, Esoteric Software
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 ******************************************************************************/
25
26#ifndef _SPINETEST_H_
27#define _SPINETEST_H_
28
29#include "cocos2d.h"
30#include "../BaseTest.h"
31#include <spine/spine-cocos2dx.h>
32
34
36{
37public:
39
40 virtual std::string title() const;
41protected:
42 std::string _title;
43};
44
46public:
49
50 virtual bool init ();
51
52protected:
53 spAtlas* _atlas;
54 spAttachmentLoader* _attachmentLoader;
55 spSkeletonData* _skeletonData;
56 spAnimationStateData* _stateData;
57};
58
60{
61public:
63
64 virtual bool init();
65
66private:
67 spine::SkeletonAnimation* skeletonNode;
68};
69
71public:
73
74 virtual bool init ();
75
76private:
77 spine::SkeletonAnimation* skeletonNode;
78};
79
81public:
83
84 virtual bool init ();
85
86private:
87 spine::SkeletonAnimation* skeletonNode;
88};
89
91public:
93
94 virtual bool init ();
95
96 virtual void update (float deltaTime);
97
98private:
99 spine::SkeletonAnimation* skeletonNode;
100};
101
103public:
105
106 virtual bool init ();
107
108private:
109 spine::SkeletonAnimation* skeletonNode;
110};
111
112#endif // _EXAMPLELAYER_H_
DEFINE_TEST_SUITE(SpineTests)
spAttachmentLoader * _attachmentLoader
Definition: SpineTest.h:54
spSkeletonData * _skeletonData
Definition: SpineTest.h:55
virtual bool init()
Definition: SpineTest.cpp:62
spAtlas * _atlas
Definition: SpineTest.h:53
spAnimationStateData * _stateData
Definition: SpineTest.h:56
CREATE_FUNC(BatchingExample)
virtual bool init()
Definition: SpineTest.cpp:120
spine::SkeletonAnimation * skeletonNode
Definition: SpineTest.h:67
CREATE_FUNC(CoinExample)
CREATE_FUNC(GoblinsExample)
virtual bool init()
Definition: SpineTest.cpp:136
spine::SkeletonAnimation * skeletonNode
Definition: SpineTest.h:77
CREATE_FUNC(RaptorExample)
spine::SkeletonAnimation * skeletonNode
Definition: SpineTest.h:87
virtual bool init()
Definition: SpineTest.cpp:153
virtual std::string title() const
Definition: SpineTest.cpp:56
std::string _title
Definition: SpineTest.h:42
CREATE_FUNC(SpineboyExample)
virtual bool init()
Definition: SpineTest.cpp:171
virtual void update(float deltaTime)
Definition: SpineTest.cpp:217
spine::SkeletonAnimation * skeletonNode
Definition: SpineTest.h:99
virtual bool init()
Definition: SpineTest.cpp:224
CREATE_FUNC(TankExample)
spine::SkeletonAnimation * skeletonNode
Definition: SpineTest.h:109