简体   繁体   English

在项目之间创建通用模块 [COCOS2D]

[英]Create common modules between projects [COCOS2D]

Hello I want to make some projects(games) with cocos2d(im new into this) that will take code or maybe some assets from a common folder.你好,我想用 cocos2d(我是新来的)制作一些项目(游戏),这些项目(游戏)将从公共文件夹中获取代码或一些资产。 how can i achieve that?我怎样才能做到这一点? for example i write a generic module that will have a state machine manager and i want to use it on both of my two cocos projects.例如,我编写了一个具有状态机管理器的通用模块,我想在我的两个 cocos 项目中使用它。 Thank you in advance!先感谢您! (im using cocos creator) (我使用 cocos 创作者)

I found a way to do it here is how I did it if anyone have the same problem.如果有人遇到同样的问题,我在这里找到了一种方法。 i putted all my cocos project into one folder and I made in that project a folder name common_assets.我把我所有的 cocos 项目放在一个文件夹中,并在该项目中创建了一个名为 common_assets 的文件夹。 after that I did go on every project assets folder and did that on powershell as an admin: ni -ItemType SymbolicLink -Path common_assets -Target ....\\common_assets之后,我确实去了每个项目资产文件夹,并以管理员身份在 powershell 上执行此操作: ni -ItemType SymbolicLink -Path common_assets -Target ....\\common_assets
That will make a symbolicLink somehow different from a normal windows on that will do the job on all of your project that have it.这将使symbolicLink 以某种方式与普通窗口不同,它将在您拥有它的所有项目上完成工作。 if you make change on common from an project it goes on any project!如果您从一个项目中对 common 进行更改,它会在任何项目中进行!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM