![]() ![]() You can add multiple, callback information will be returned to the above binding function. You can write like thisĪrmatureDisplay:bindDragonEventListener (handler (self, self.callbackfunc))ĪddDragonEventType Adds a listener event type with a string argument. In order for cocos2dxlua to use the event callback, two methods have been added in the CCArmatureDisplay, respectively:īindDragonEventListener Binds the listener callback as a function. Free 2D Skeletal Animation SolutionConnect Animation Creation and Game Programming PipelinesReduce Art Cost and Produce More Vivid Animation Get DragonBones. The exported API information is located in the following directoryĪt present these APIs can now run the official example, and See also added, if you need more API, you can add them in dragonbones.ini by yourself.API name rules Basic and CPP version of the same call to db beginning, such as: db.CCFacotry: getInstance (), more use You can see the demo which has been done. Register_dragonbone_CCArmatureDisplay_extend ( LuaEngine::getInstance()-> getLuaStack()-> getLuaState()) Register_all_dragonbones ( LuaEngine::getInstance()-> getLuaStack()-> getLuaState()) Register Lua binding, call register_all_dragonbones and register_dragonbone_CCArmatureDisplay_extend these two functions in C ++.īool AppDelegate :: applicationDidFinishLaunching ().Add "project dependencies" and "references" to the main project libDragonbones.Open the new project with VS2015, and import the libdragonbones project, the project configuration file path is as follows:įrameworks\cocos2d-x\cocos\editor-support\dragonbones\renderer\cocos2d-x-3.x\proj.win32\libDragonbones.vcxproj.Create a Cocos2dx Lua project, and then overwrite these files to the project root directory.With Cocos2dx Lua project to achieve the fire Demo of DragonbonesCPP project。.Modify the DragonbonesCPP part of the code to make it more convenient to export to Cocos2dx Lua use, and try to keep with the original use of the same rules.Modify the lua-bindings of Cocos2dx to support member variables of exported classes, and modify the rename_functions rule so that it no longer conflicts with skip rules.Organize DragonbonesCPP to make it easier for Cocos2dx to import.Register_dragonbone_CCArmatureDisplay_extend( LuaEngine::getInstance()-> getLuaStack()-> getLuaState()) įrameworks\cocos2d-x\cocos\scripting\lua-bindings\auto\api Register_all_dragonbones( LuaEngine::getInstance()-> getLuaStack()-> getLuaState()) # include "dragonbones/lua-bindings/lua_dragonbone_CCArmatureDisplay_extend.h "īool AppDelegate::applicationDidFinishLaunching() Thanks a lot in advance for your time and help.# include "scripting/lua-bindings/auto/lua_dragonbones_auto.hpp " Uncaught ReferenceError: PIXI is not definedĭo you have any idea what I'm doing wrong, and how to fix the situation that Dragonbones doesn't report the error that PIXI is not defined. Here is the class where I'm trying to add Dragonbones object. I installed via npm Dragonbones and I tried to add a dragonbones animation object to the scene, but unfortunately the dragonbones gives me an error. Because I am writing a new project with modules and import / export classes. I am currently working on a new project and have to use Dragonbones. I am new here but I have been using Pixi.js for several years. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |