十四 手游开发神器 cocos2d-x editor 之串联游戏流程
Posted makeapp628
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了十四 手游开发神器 cocos2d-x editor 之串联游戏流程相关的知识,希望对你有一定的参考价值。
一般游戏都包括几个流程,加载界面,开始界面,选关界面,主界面,暂停界面等等;这节我将这些流程都串联起来;
代码下载:http://www.kuaipan.cn/file/id_25348935635745200.htm?source=1
loading界面;
LoadingLayer.ccbx
<?xmlversion="1.0"encoding="UTF-8"?>
<Document
jsControlled="true"
jsController=""
resolution="default"
>
<Resolutions>
<ResolutioncenteredOrigin="false"ext="iphone"height="1280"width="720"name="default"scale="1"/>
<ResolutioncenteredOrigin="false"ext="iphone"height="720"width="1280"name="default1"scale="1"/>
</Resolutions>
<Animations>
<AnimationautoPlay="true"
id="0"
name="Default Timeline"
length="10"
chainedId="0"
offset="0.0"
position="0.0"
resolution="30"
scale="128">
<CallbackChannel>
</CallbackChannel>
<SoundChannel>
</SoundChannel>
</Animation>
</Animations>
<Layer
positionX="0"positionY="0"
width="100"height="100"sizeType="Percent"
anchorPointX="0.5"anchorPointY="0.5"ignoreAnchorPoint="true"
scaleX="1"scaleY="1"
touchEnabled="true"positionType="LeftBottom"target="Owner">
<LayerColorpositionType="LeftBottom"width="720"height="1280"positionX="0"positionY="0"anchorPointX="0"
anchorPointY="0"color="#ffff40b8"target="Doc"/>
<SpritepositionType="LeftBottom"width="245.0"height="72.0"positionX="381.0"positionY="661.0"anchorPointX="0.5"
anchorPointY="0.5"src="Resources/snow_packer.plist/sa_loading_0001.png"
target="Owner"/>
</Layer>
</Document>
开始界面;
StartLayer.ccbx
<?xmlversion="1.0"encoding="UTF-8"?>
<Document
jsControlled="true"
jsController="StartLayer"
resolution="default"
>
<Resolutions>
<ResolutioncenteredOrigin="false"ext="iphone"height="1280"width="720"name="default"scale="1"/>
<ResolutioncenteredOrigin="false"ext="iphone"height="720"width="1280"name="default1"scale="1"/>
</Resolutions>
<Animations>
<AnimationautoPlay="true"
id="0"
name="Default Timeline"
length="10"
chainedId="0"
offset="0.0"
position="0.0"
resolution="30"
scale="128">
<CallbackChannel>
</CallbackChannel>
<SoundChannel>
</SoundChannel>
</Animation>
关于本人拙著《Cocos2d-x 3.x实战:卡牌手游开发指南》源码的有关说明