Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

example-projects

> 编程语言
Open source

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

1.3K stars0 likes1 views
WebsiteGitHub

About

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

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

  • 01_sprite

    • Simple Sprite
    • Atlas Sprite
    • Sliced Sprite
  • 02_particle

    • Toggle Particle

界面相关 UI

  • 01_widget 

    • Widget Align
    • Auto Resize
  • 02_label

    • System Font Label
  • 03_button

    • Simple Button

玩法相关 Gameplay

  • 01_player_control

    • Keyboard Input
    • Touch Input
  • 02_actions

    • Simple Action
  • 03_animation

    • Sprite Animation

音效相关 Audio

  • Simple Audio

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptcocoscocos-creatorcocoscreatordemo

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言