Coder Social home page Coder Social logo

cocos / example-projects Goto Github PK

View Code? Open in Web Editor NEW
1.3K 74.0 597.0 54.91 MB

Example project to guide users through how to create game with Cocos Creator

JavaScript 91.72% Java 3.31% Objective-C 0.61% Objective-C++ 2.49% TypeScript 1.87%
cocos cocos-creator cocoscreator example demo

example-projects's Introduction

Cocos Creator 2.x 开发范例

本项目同时面向 Cocos Creator 引擎开发人员和最终用户,目的是建立一套贯穿开发、测试、学习使用的完整的功能范例。

项目结构

assets
  |--cases (范例场景和脚本存放位置)
  |    |--01_graphics (图像相关)
  |    |--02_ui(用户界面相关)
  |    |--03_gameplay(玩法相关)
  |    |--04_audio (音效效果)
  |    |--import(外部数据导入相关)
  |    |--data(用户数据处理)
  |--res(范例使用的资源)
  |   |--atlas(图集资源)
  |   |--font(字体)
  |   |--imported(外部导入资源)
  |   |--textures(贴图资源)
  |--scripts(公共脚本)

每一类范例里可以根据需要再次细分类别,每个范例首先要有一个场景文件,里面包括了范例功能的展示。

在范例场景所在目录下,放置所需要的脚本,外加一个和范例场景同名的md文件,里面是范例功能的使用说明。请参考已有的md文件来书写。

开发者要求

开发者在开发新功能时,请新建一个范例后使用范例作为功能展示和测试用途。在功能开发完成后,书写使用说明,以方便 QA 测试跟进,和最终用户及时准确的掌握用法。

场景名使用驼峰命名,文件夹名使用下划线分割。

范例说明索引

每篇说明文档都和范例场景同名,并且放在同一个目录下。

图像相关 Graphics

界面相关 UI

玩法相关 Gameplay

音效相关 Audio

example-projects's People

Contributors

2youyou2 avatar cocos-robot avatar colincollins avatar drelaptop avatar holycanvas avatar hylthink avatar jareguo avatar knightli2003 avatar knoxhuang avatar marssssssss avatar nantas avatar pandamicro avatar pppro avatar raksa avatar sunnylanwanjun avatar taixuan91 avatar tidys avatar visualsj avatar wuzhiming avatar xunyi0 avatar zhifenghu avatar zilongshanren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-projects's Issues

[Request] remove proj.android files for creator2.0

with this changes, cocos/engine-native#1352

those below should be removed for ant project and binary template removed

example-case

suggestion [Optional]

Since only one file AppActivity.java existed at build-templates dir, don't need to put both copy into jsb-default and jsb-link. Only one file, one copy is ok. copy it into different dir when build

please check this @jareguo

场景跳转但是没有资源加载

image
若利用 search 进行场景跳转有概率出现资源场景内不加载资源问题,同时重新回到 TestList 场景再次跳转(无论何种方式)该场景都没有加载资源显示内容

集合范例点运行报错 creator v1.1.2

TypeError: Cannot read property 'LineJoin' of undefined
at Object.require.linejoin: "let LineJoin = cc.Graphics.LineJoin" (assets/cases/graphics/example/linejoin.js:1)
at s (../../../../../../Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/browser-pack/_prelude.js:1)
at e (../../../../../../Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/browser-pack/_prelude.js:1)
at file:///Users/lianghangbing/CocosJsProj/example-cases/library/bundle.project.js?001:1:451

missing script

i just clone and open, then get warning

Script attached to "mask" in scene "TestList.fire" is missing or invalid. Detailed information:
Node path: "Menu/readme/mask"
Asset url: "db://assets/TestList.fire"

Not working

Examples not working properly.

  1. Test List displaying blank items (with no text).
  2. Everything is in Chinese.
  3. Instructions section not displaying text.
  4. No documentation

ReferenceError: dragonBones is not defined

ReferenceError: dragonBones is not defined
at Object.require.DragonBonesCtrl: "requireComponent: dragonBones.ArmatureDisplay" (assets/cases/dragonbones/DragonBonesCtrl.js:20:8)
at s (../../../../../../Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/browser-pack/_prelude.js:1)
at e (../../../../../../Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/browser-pack/_prelude.js:1)
at file:///Users/footprint/Downloads/example-cases-master/library/bundle.project.js?001:1:451

Crushed on Android app 2.2.1

12-12 10:02:03.773 642 676 E InputDispatcher: channel '960d932 org.cocos2d.examplecases/org.cocos2dx.javascript.AppActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

增加截屏 example

每个平台截屏方法可能不一样。
需要对原生、小游戏、Web 平台分别开发。
开发完后,修改 FAQ 里的这部分内容,引导用户直接看范例

Max steel

It's going to be like subway surfers like the picture of the film Max steel their is going to be steel their and beast their

将所有范例的 Background Prefab 节点设置为自动同步

目前是手动同步的,其实 TestList 中的背景色已经调整过了。不过其它范例都没变,要一个一个改过去吗…… 疯了。还是用自动同步吧,这样以后换背景的时候就不用重新设置。

提交到 v2.0,记得提交后提醒所有人更新一下仓库,免得造成冲突

太不友好了

程序报错,跑不起来
Cannot read property 'loadRes' of undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.