cocos2dx使用cocostudio导出的animation
local ui
local function createLayerUI()
if not ui then
ui=cc.Layer:create();
createLayerUI=nil;
end
return ui;
end
local sc
local function createLayerScene()
if not sc then
sc=cc.Layer:create();
createLayerScene=nil;
end
return sc;
end
local entity
local function createLayerEntity()
if not entity then
entity=cc.Layer:create();
createLayerEntity=nil;
end
return entity;
end
cc.FileUtils:getInstance():addSearchPath("res")
local sceneGame=cc.Scene:create()
sceneGame:addChild(createLayerUI())
cc.Director:getInstance():runWithScene(sceneGame)
--ui:addChild(ccs.GUIReader:shareReader():widgetFromJsonFile("res/SampleChangeEquip_1.json"))
print("format", tostring({}))
sceneGame:addChild(createLayerScene())
local node =ccs.SceneReader:getInstance():createNodeWithSceneFile("res/RPGGame.json")
sc:addChild(node)
node:setPosition(-200,-100)
sceneGame:addChild(createLayerEntity())
ccs.ArmatureDataManager:getInstance():addArmatureFileInfo("res/DemoPlayer.ExportJson");
local armature = ccs.Armature:create("DemoPlayer");
armature:setPosition(200, 200);
armature:setScaleX(0.2);
armature:setScaleY(0.2);
entity:addChild(armature);
armature:getAnimation():play("walk")
cocos2dx使用cocostudio导出的animation的更多相关文章
- cocos2dx使用cocostudio导出的scene
local uilocal function createLayerUI() if not ui then ui=cc.Layer:create(); createLayerUI=nil; end r ...
- cocos2dx使用cocostudio导出的ui
local uilocal function createLayerUI() if not ui then ui=cc.Layer:create(); createLayerUI=nil; end r ...
- Cocos2d-x——导入Cocostudio资源
(搬运自我在SegmentFault的博客) 目前正在和实训的小组成员一起做一款手机2D游戏,我们采用了Cocos2d-x进行开发.之前虽然早有耳闻,这次却是第一次认真地学习和使用Cocos2d-x. ...
- CocoStudio基础教程(3)在程序中处理cocoStudio导出动画
1.概述 使用cocoStudio可以方便的制作动画,接下来的工作就是在我们的程序中使用制作的动画.这篇中,我将使用程序将两个动画连接起来 2.关联到项目 运行脚本创建我们的项目,将导出的动画.UI放 ...
- osgExp只能将3dmax中的动画导出为路径动画osg::AnimationPath,而不能导出osgAnimation::Animation。osg播放骨骼动画应该使用FBX格式
通过实际的模型测试,导出为.osg文本格式,搜索animation,只能搜索到AnimationPathCallback,而搜索不到osgAnimation相关类 在OSGExp1.5.0源代码中搜索 ...
- cocos2d-x中CCEditbox导出到lua
自从工作后感觉时间较少(每天工作9-22,晚上就不想动了,早上想多睡点),工作中用的是 cocos2d-x.cocos2d-x是一款手机游戏引擎,虽然支持lua,但和love2d相比非纯lua游戏引 ...
- cocostudio导出plist文件
今天在用Armature类时用到cocostudio导出文件,由于美术的原因他使用的是中文命名法(这你敢相信),后面在导入程序中跟了下代码发现是解析plist文件有误,我就来比较正常功能文件和有错文件 ...
- 在项目代码中载入cocostudio导出的动画并循环播放
须要在代码中引入#include "cocostudio/CocoStudio.h" using namespace cocostudio; ArmatureDataManager ...
- cocos2d-X JS 获取cocostudio中的UI组件
1.先加载cocostudio导出的json文件,代码如下所示: var dong = ccs.load("res/Login.json"); //_login.setPositi ...
随机推荐
- Android 比ListView更好用强大的RecyclerView库:RecyclerViewLibrary
RecyclerViewLibrary A RecyclerView libirary ,has some support, like headerAdapter/TreeAdapter,and Pu ...
- mysql left join查询没走索引
SELECT t0.ID as id, t0.`NAME` as name, t0.PHONE as phone, t0.`CITY_CODE` as cityCode, t0.SHOOTING_TI ...
- #淘宝#复制分享宝贝内容,打开淘宝APP,自己主动弹出宝贝提示信息
场景描写叙述: 淘宝复制连接,分享出去,比方拷贝到QQ好友.微信好友,一个宝贝信息.然后你朋友长按复制你分享它了的这个宝贝.当然打开手机淘宝时.自己主动会跳出宝贝的信息,点击确定能够直接进入宝贝详情 ...
- kali渗透综合靶机(一)--Lazysysadmin靶机
kali渗透综合靶机(一)--Lazysysadmin靶机 Lazysysadmin靶机百度云下载链接:https://pan.baidu.com/s/1pTg38wf3oWQlKNUaT-s7qQ提 ...
- RAP + MOCK
前后端分离式开发的思考 目前大部分公司都实行了前后端分离开发.然而在项目开发过程当中,经常会遇到以下几个尴尬的场景: 1.前端开发依赖于后端接口数据,需要与后端接口联调才能获得数据展示,从而拖慢了开发 ...
- curl测试Docker容器连通性
通过curl来测试docker对外访问是否正常,这里测试Docker tomcat容器访问: [root@mysqlserver ~]# curl http://172.17.0.8:8080 < ...
- Spring 应用外部属性文件 配置 context 错误
在Spring配置文件中出现通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明这个错误,其实主要是我们在引入命名空间时没有正确引入它的DTD解析 ...
- Tomcat + Spring MVC + HttpClient:怎样使用PUT和PATCH方法传递数据
在RESTful风格的API中.PUT/PATCH方法一般用于更新数据.在项目的代码中,使用的是HttpClient 4.5,是这样写的: protected JSONObject doHttpUri ...
- Linux - vim安装 配置与使用
一 Vim 简单介绍 曾经一直用vi,近期開始使用 vim,以下将两者做一下比較. vi和vim都是word=%E5%A4%9A%E6%A8%A1&fr=qb_search_exp&i ...
- CAP原则 和BASE
CAP原则又称CAP定理,指的是在一个分布式系统中,Consistency(一致性). Availability(可用性).Partition tolerance(分区容错性),三者不可得兼 [1] ...