Compare commits

..

126 Commits

Author SHA1 Message Date
yhh 358e899e8b 新增 CoroutineManager 协同程序 2020-08-28 19:12:21 +08:00
yhh 7a308f76b6 debugRender 新增camera参数来修正渲染位置 2020-08-28 18:04:50 +08:00
YHH a3c53116e1 修复碰撞器旋转后bounds计算错误 2020-08-28 09:13:53 +08:00
yhh d07912d610 新增虚拟输入类 VirtualInput 2020-08-27 18:48:20 +08:00
yhh e81f98ff17 修复Vector2.zero引起的引用混乱问题 2020-08-26 19:56:48 +08:00
yhh 1997b3f348 timeruler 绘制 2020-08-25 19:04:12 +08:00
yhh 0ab0728ddf update readme 2020-08-25 17:42:03 +08:00
yhh 46a8de39e3 新增windTransition例子 2020-08-25 17:28:22 +08:00
yhh 794e33a0a0 修复tiledmap tmxDirectory不正确问题 2020-08-25 16:19:56 +08:00
yhh 0bb09f6442 Merge branch 'master' of https://github.com/esengine/egret-framework 2020-08-25 14:21:46 +08:00
yhh 27dea50026 新增Ref类型 2020-08-25 14:21:37 +08:00
YHH a39677062c Merge pull request #30 from esengine/imgbot
[ImgBot] Optimize images
2020-08-24 17:28:04 +08:00
YHH 27f9e78fe5 为boxCollider与spriteRenderer新增debugRender 2020-08-24 09:06:25 +08:00
ImgBotApp fc0a46d6a8 [ImgBot] Optimize images
*Total -- 30.71kb -> 8.13kb (73.53%)

/demo/resource/characters/1.png -- 4.86kb -> 1.18kb (75.76%)
/demo/resource/characters/5.png -- 5.14kb -> 1.28kb (75.09%)
/demo/resource/characters/6.png -- 4.88kb -> 1.25kb (74.41%)
/demo/resource/characters/2.png -- 5.17kb -> 1.41kb (72.79%)
/demo/resource/characters/4.png -- 5.34kb -> 1.51kb (71.74%)
/demo/resource/characters/3.png -- 5.32kb -> 1.51kb (71.69%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-08-23 14:10:25 +00:00
YHH 7345a17d24 新增ninja adventure例子 2020-08-23 22:09:22 +08:00
YHH 6c1cfec928 新增Physics.linecast/linecastAll方法 2020-08-22 12:21:40 +08:00
YHH 73f0f54ba7 Merge pull request #29 from esengine/imgbot
[ImgBot] Optimize images
2020-08-22 00:05:29 +08:00
ImgBotApp 24705d24f1 [ImgBot] Optimize images
*Total -- 162.77kb -> 109.27kb (32.87%)

/demo/resource/preload/orange.png -- 25.79kb -> 5.85kb (77.32%)
/demo/resource/preload/bg.png -- 7.88kb -> 2.81kb (64.37%)
/demo/resource/preload/moon.png -- 1.34kb -> 0.75kb (43.88%)
/demo/resource/preload/orangeNorm.png -- 60.69kb -> 45.92kb (24.32%)
/demo/resource/preload/bgNorm.png -- 28.49kb -> 22.06kb (22.59%)
/demo/resource/assets/buch-outdoor.png -- 16.16kb -> 12.65kb (21.74%)
/demo/resource/preload/moonNorm.png -- 22.42kb -> 19.24kb (14.21%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-08-21 11:22:17 +00:00
yhh 646d1806ec demo 更新 2020-08-21 19:21:40 +08:00
yhh 6d4d787530 修复tiled中objectgroup塞image解析失败问题 2020-08-18 17:39:11 +08:00
yhh 66ef4c6597 tmxDirectory 2020-08-17 19:40:44 +08:00
YHH f7ee2c8d1c tiled 防止中断合批 2020-08-15 22:29:45 +08:00
YHH b3961d8ea1 Merge branch 'master' of https://github.com/esengine/egret-framework 2020-08-15 22:25:22 +08:00
YHH 1a2dd9ff2a tiled 文本位置居中 2020-08-15 22:24:08 +08:00
YHH 21e33495d8 Merge pull request #27 from esengine/develop_tiled
tiled 支持
2020-08-15 22:01:37 +08:00
YHH 23a45bfd2d Merge remote-tracking branch 'remotes/origin/master' into develop_tiled
# Conflicts:
#	demo/libs/framework/framework.min.js
#	source/bin/framework.min.js
2020-08-15 22:00:43 +08:00
YHH 593cc83012 #28 tiled objectgroup解析 2020-08-15 21:59:52 +08:00
YHH f0b2d5b9b8 #28 支持objectgroup的tile类型 2020-08-15 18:16:59 +08:00
YHH 5dc7a72310 #28 tiled orthogonal支持 2020-08-15 12:16:23 +08:00
yhh 89d05726ac #18 动态图集用于优化drawcall 2020-08-14 15:46:19 +08:00
yhh 15f6b06348 #28 修复解析properties 2020-08-14 11:44:20 +08:00
YHH a2a73562a0 #28 tileset 渲染 2020-08-14 08:54:27 +08:00
YHH 9111b69cee #28 parselayers方法修改 2020-08-13 22:23:02 +08:00
yhh 4290a10d5d #28 解析layers 2020-08-13 20:32:36 +08:00
yhh b0511db001 #28 tiled 数据解析与渲染 2020-08-13 17:39:24 +08:00
yhh 4012a9f6d1 新增场景截图 requestScreenshot 2020-08-12 19:57:06 +08:00
yhh e5805960e0 #28 新增tiledMapRenderer用于渲染tiledmap 2020-08-12 18:08:12 +08:00
yhh 167ef03df6 tiled 基本数据 2020-08-12 12:16:35 +08:00
yhh c89ed25d8a update readme 2020-08-11 14:20:39 +08:00
yhh 4baaa2629d Merge branch 'master' of https://github.com/esengine/egret-framework
# Conflicts:
#	README.md
2020-08-11 11:08:27 +08:00
yhh a3dbff63f0 新增相机震动、场景组件 2020-08-11 11:07:20 +08:00
YHH c6ef018d5e Update Reademe 2020-08-10 14:14:20 +08:00
YHH 14b70b307c camera.mapSize 支持左上顶点更改 2020-08-08 15:09:10 +08:00
YHH a39b98b5d9 #23 修复绘制层级问题 2020-08-08 14:43:43 +08:00
YHH 3492bbdf5e 修复scrollingSprite无法向左移动问题 2020-08-08 14:11:25 +08:00
YHH 7d0bcbcb32 demo fix 2020-08-08 10:18:56 +08:00
YHH c02a3aa071 Merge branch 'master' of https://github.com/esengine/egret-framework 2020-08-08 10:12:43 +08:00
YHH a105bb11ca 修复origin导致显示位置错误问题 2020-08-08 10:12:08 +08:00
YHH 3fbbba7ac2 Merge pull request #25 from esengine/develop
#16 新增createEntityAsync方法
2020-08-08 09:51:24 +08:00
YHH 7cd38ea54e #16 新增createEntityAsync方法
修复entity.id为null
2020-08-08 09:50:40 +08:00
YHH 42852c5dba Merge pull request #24 from esengine/develop
#23 组件绘制层支持
2020-08-08 09:44:05 +08:00
YHH 6a3622a5ef #23 组件绘制层支持 2020-08-08 09:43:03 +08:00
YHH 03b568e28d Merge pull request #22 from esengine/develop
#21 新增gapXY用于平铺/滚动间距
2020-08-08 09:07:35 +08:00
YHH e7fb9e0d6b #21 完善 gapxy 2020-08-08 09:06:32 +08:00
yhh 463c64c628 #21 新增gapXY用于平铺/滚动间距 2020-08-07 15:34:42 +08:00
YHH 4025bc8554 Merge pull request #20 from esengine/develop
实现精灵平铺效果
2020-08-07 11:03:05 +08:00
yhh 1bf822725a #19 滚动精灵支持 2020-08-07 11:02:04 +08:00
YHH 359d7ae223 实现 scrollingSprite 2020-08-07 09:21:55 +08:00
YHH c611e31f7e Merge branch 'master' into develop
# Conflicts:
#	demo/libs/framework/framework.min.js
#	demo/src/game/MainScene.ts
#	source/bin/framework.min.js
2020-08-07 08:51:19 +08:00
YHH 834ad565e1 #19 实现精灵平铺效果 2020-08-07 08:50:26 +08:00
yhh ab3f38c6a8 修复lockUtils在wx上报错问题 2020-08-06 12:01:20 +08:00
yhh d0199e357b 修复vector2 y=0赋值错误问题 2020-08-06 10:55:02 +08:00
yhh 8e3bcc1257 射线检测完善 2020-08-03 14:45:57 +08:00
YHH a4fe9f5798 Merge pull request #15 from esengine/develop_ray
射线检测
2020-08-03 14:08:30 +08:00
yhh c692f0157e 新增射线检测 2020-08-03 14:06:47 +08:00
yhh bc6626865e ray2d 2020-07-31 19:33:04 +08:00
yhh 40fe7a57db 新增raycast射线 2020-07-31 17:17:44 +08:00
yhh 514572f291 reformat code 2020-07-28 16:25:20 +08:00
yhh 5994f0bee3 Merge branch 'master' of https://github.com/esengine/egret-framework 2020-07-28 16:12:31 +08:00
yhh b3e1f2c446 边框支持旋转 2020-07-28 16:11:58 +08:00
YHH ed13186779 Merge pull request #13 from esengine/develop_collider
整理ecs框架
2020-07-28 11:08:46 +08:00
yhh d730851d97 修复circleToBox检测偏差问题 2020-07-27 18:16:19 +08:00
yhh 60921f703b #12 fix addObserver函数异常错误 2020-07-27 17:27:32 +08:00
yhh 506f8ddc0f 新增renderablecomponent显示
优化返回值
2020-07-27 16:10:36 +08:00
YHH 149a3e5833 修复tostring导致的循环maxinum call 2020-07-26 23:27:42 +08:00
yhh 2b13e5ee7d 初始化默认数值 2020-07-24 16:57:26 +08:00
yhh 6be43fc9ac 优化transform结构
新增实体列表排序
2020-07-24 15:29:07 +08:00
yhh d4c244daf5 修复运行时未初始化 2020-07-23 19:28:01 +08:00
yhh 79c5d6990c SceneManager更改为Core继承egret.DisplayContainer 2020-07-23 15:39:18 +08:00
yhh 347626a8ea 忽略ide缓存 2020-07-23 13:26:52 +08:00
yhh e61dd0c16b 优化matrix 2020-07-23 13:25:10 +08:00
yhh 1b52bc5fd1 全部移动至es模块 2020-07-23 11:00:46 +08:00
YHH 814234ca61 移动类至es模块 2020-07-23 09:10:27 +08:00
YHH 15c0844e29 移动部分类模块至es
优化框架
2020-07-22 23:30:31 +08:00
yhh 5b8f414a45 整理ecs框架 2020-07-22 20:07:14 +08:00
yhh 6b8569b0b5 collider更改 2020-07-20 16:38:49 +08:00
yhh 2a38858838 提供对SpriteAnimator中的一些字段的访问 2020-07-20 13:46:58 +08:00
yhh e76d5815f2 1. 修正了相机在变焦时不能保持在目标中心的问题
2. 增加检查,以确保碰撞器被触发时enabled也开启
2020-07-20 13:44:26 +08:00
yhh dccd4e21b6 base64辅助类 2020-07-17 15:40:28 +08:00
yhh c96e8b3a04 新增Time/String/Array/Keyboard/Random/Object/Texture辅助类 2020-07-17 14:34:42 +08:00
YHH e686ba64d7 Update README.md 2020-07-17 11:55:29 +08:00
yhh 14cb9cd257 贝塞尔曲线 2020-07-17 11:07:57 +08:00
yhh 13e7737cb9 防止删除一个空的函数发生未定义报错 2020-07-15 10:56:06 +08:00
yhh dd65c60921 Merge branch 'master' of https://github.com/esengine/egret-framework 2020-07-15 10:53:38 +08:00
yhh 7dffb4d94a #12 fix Emitter类移除监听时是否有错 2020-07-15 10:53:30 +08:00
YHH 476204a296 Update README.md 2020-07-13 17:13:53 +08:00
yhh 983c8fbc99 iupdatable无法判断接口 去除改为component支持 2020-07-13 12:48:42 +08:00
YHH c30e591f6e Update README.md 2020-07-13 10:56:25 +08:00
YHH d9a1b5578c Update README.md 2020-07-13 10:56:06 +08:00
YHH f0e04b6981 emitter 支持 context 2020-07-12 23:41:10 +08:00
YHH 14598f08c7 sceneChanged事件 2020-07-12 23:30:48 +08:00
YHH 032b293085 新增analysis用于分析游戏缺陷 2020-07-12 14:51:20 +08:00
YHH d9bb76c105 Merge branch 'master' of https://github.com/esengine/egret-framework
# Conflicts:
#	demo/libs/framework/framework.d.ts
#	demo/libs/framework/framework.min.js
#	demo/src/game/MainScene.ts
#	source/bin/framework.d.ts
#	source/bin/framework.min.js
2020-07-12 09:46:07 +08:00
YHH 20392c8ab6 Set theme jekyll-theme-slate 2020-07-10 12:19:47 +08:00
yhh 583e03d025 Merge branch 'develop' 2020-07-10 11:25:11 +08:00
yhh f6c2d81a83 新增IUpdatable接口 用于减少update所带来的的性能损耗 2020-07-10 11:24:42 +08:00
YHH e703ff4e6c Merge pull request #11 from esengine/develop
Develop
2020-07-09 16:37:13 +08:00
yhh 877fc4c9bf astar 注释 2020-07-09 16:36:42 +08:00
yhh a80bb4b6f3 绘制帮助类 2020-07-09 16:16:04 +08:00
YHH 9b9d210109 Merge pull request #10 from esengine/develop
新增 circleCollider与 polygonCollider
2020-07-09 15:13:58 +08:00
yhh 817b703d4f 新增 circleCollider与 polygonCollider 2020-07-09 15:11:30 +08:00
YHH 88a25453e6 Merge pull request #9 from esengine/develop
对boxcollider碰撞支持
2020-07-09 14:16:52 +08:00
yhh 6e3eb1189a 修复boxcollider碰撞问题 2020-07-09 14:16:10 +08:00
YHH 1e3b2763e8 Merge branch 'develop' of https://github.com/esengine/egret-framework into develop 2020-07-08 22:00:39 +08:00
YHH a3dacd04f0 Merge branch 'master' into develop
# Conflicts:
#	demo/libs/framework/framework.min.js
#	demo/src/game/MainScene.ts
#	source/bin/framework.min.js
2020-07-08 21:56:07 +08:00
yhh aea50926a9 优化spriteRenderer渲染方法 2020-07-08 18:12:17 +08:00
yhh 299c1b8e7d 修复切换场景未移除问题 2020-07-08 15:15:15 +08:00
YHH 3f6ab79894 滚动精灵 2020-07-07 21:40:57 +08:00
yhh b14fee1685 box重载overlaps 2020-07-07 18:54:19 +08:00
yhh ace8fb685d box 重载 collidesWith 2020-07-07 12:18:51 +08:00
YHH 1870ee5e45 Merge pull request #8 from esengine/develop
Develop
2020-07-03 17:53:08 +08:00
yhh 8be65fa685 update reademe 2020-07-03 17:52:26 +08:00
yhh cf4e76b12d 新增tiledspriterenderer 2020-07-03 17:51:18 +08:00
YHH c156463f10 Merge pull request #7 from esengine/develop
新增动画 移除不相关的库
2020-07-03 16:48:34 +08:00
yhh e7796550c6 移除资源 2020-07-03 16:47:24 +08:00
yhh c3c9181400 新增动画 移除不相关的库 2020-07-03 16:45:52 +08:00
322 changed files with 82297 additions and 26243 deletions
+6
View File
@@ -1,3 +1,9 @@
/source/node_modules
/demo/bin-debug
/demo/bin-release
/.idea
/.vscode
/demo_wxgame
/demo/.wing
/demo/.idea
/demo/.vscode
-15
View File
@@ -1,15 +0,0 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
+119 -32
View File
@@ -1,52 +1,139 @@
# egret-framework
Cegret-framework
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/esengine/egret-framework.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/esengine/egret-framework/context:javascript)
```
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/esengine/egret-framework.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/esengine/egret-framework/context:javascript)
这是一套用于egret的游戏框架,里面包含ECS框架用于管理场景实体,一些常用2D碰撞检测及A*寻路。如果您还需要包含其他的AI系统可以查看作者其他库(行为树、简易FSM、实用AI)。
## 在线框架演示
[非完整游戏演示](http://www.hyuan.org/samples)
## 入门教程
[Getting Start](https://github.com/esengine/egret-framework/wiki/Getting-Start)
打开白鹭工程 替换 `Main.ts` 文件内容
```ts
class Main extends es.Core {
/**
* 由监听事件 egret.Event.ADDED_TO_STAGE后触发的事件
*/
protected initialize() {
// 初始化游戏逻辑
}
/**
* 由监听事件 egret.Event.ENTER_FRAME后触发的事件
*/
protected async update(){
// 如果需要更新方法 不能删除super.update()
// 会导致框架内所有组件及实体无法更新
super.update();
// 更新逻辑
}
/**
* 在update方法执行完毕后执行 draw方法
*/
public async draw(){
// 如果需要绘制方法 不能删除super.draw()
// 会导致框架内所有渲染组件位置无法更新
super.draw();
// 绘制逻辑
}
}
```
这是一套用于egret的游戏框架,里面包含ECS框架用于管理场景实体,MVC框架用于管理ui界面(fairygui),一些常用2D碰撞检测及A*寻路。如果您还需要包含其他的AI系统可以查看作者其他库(行为树、简易FSM、实用AI)。
## 当前版本功能
## 版本计划功能
- [x] 简易ECS框架
- [x] 组件列表
- [x] 碰撞组件
- [x] 移动组件
- [x] 滚动精灵组件
- [x] 平铺精灵组件
- [x] 序列帧动画组件
- [x] 相机震动组件
- [x] 相机组件
- [x] 组件池
- [x] 基础碰撞组件(矩形、圆形、多边形碰撞)
- [x] 场景组件
- [x] 系统列表
- [x] 被动系统
- [x] 协调系统
- [x] 实体系统
- [x] 实体解析系统
- [x] 扩展库
- [x] object扩展
- [x] string扩展
- [x] texture扩展
- [x] time扩展
- [x] [array扩展(Extension](https://github.com/esengine/egret-framework/wiki/Array-%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E)
- [x] base64扩展
- [x] Stopwatch计数器
- [x] Input输入帮助
- [x] Keyboard键盘帮助
- [x] List池对象
- [x] Lock锁帮助
- [x] Emitter事件发射器
- [x] Random随机类帮助
- [x] Rectangle矩形帮助类
- [x] Vector2向量帮助类
- [x] Content资源管理器
- [x] 全局管理器
- [x] 向量集Bitset
- [x] 图形帮助
- [x] 场景过渡
- [x] 后处理器
- [x] 场景渲染器
- [x] 特效组
- [x] A*寻路(AStar)
- [x] 常用碰撞检测
- [x] 数学库
- [x] 简易矩阵类
- [x] 简易2d 向量类
- [x] 掩码实用类
- [x] 矩形类(Rectangle
- [x] 简易2D矩阵类(Matrix2D
- [x] 简易2d 向量类(Vector2
- [x] 数学扩展库(MathHelper
- [x] 掩码实用类(Flags
- [x] 贝塞尔曲线(Bezier
- [x] 物理系统(简易)
- [x] Collision碰撞检测
- [x] ColliderTrigger帮助
- [x] Ray2D射线检测
- [x] ShapeCollision 多种形状检测
- [x] RealtimeCollisions 实时碰撞检测
- [x] SpatialHash 网格检测
- [x] BreadthFirst 寻路算法
- [x] Dijkstra 寻路算法
- [x] 事件处理器
## 计划列表
## 关于egret用ecs框架(typescript/javascript
ecs 是功能强大的实体组件系统。typescript与其他语言不同,因此我对ecs的设计尽可能的支持typescript特性。虽然ecs拥有标准实体组件系统,但在细节上有很大不同。创建标准ecs通常处于原始速度、缓存位置和其他性能原因。使用typescript,我们没有struct,因为没有必要匹配标准实体组件系统的设计方式,因为我们对内存布局没有那种控制。
- [ ] ECS
- [ ] 组件列表
- [x] 碰撞组件
- [x] 移动组件
- [ ] 刚体组件
- [ ] 点光源/灯光组件
- [ ] 阴影组件
- [ ] 轨迹组件
- [ ] 滚动组件
- [ ] 网格弹簧组件
- [ ] 相机震动组件
- [ ] 霓虹灯组件
- [x] 跟随相机组件
- [ ] 系统列表
- [ ] 被动系统
- [ ] 协调系统
- [ ] 简易MVC框架
- [ ] 数学库
- [ ] 贝塞尔曲线
- [ ] 快速随机数类
- [ ] 浮点助手类
- [ ] 高性能数组
ecs更灵活,可以更好的集中、组织、排序和过滤游戏中的对象。ecs让您拥有轻量级实体和组件,这些组件可以由系统批量处理。
例如,您在制作一个射手,您可能会有几十到几百个子弹,这些作为轻量级实体由系统批量处理。
所以ecs在设计当中拥有四种重要类型:世界(Scene),过滤器(Matcher),系统(System)和实体(Entity)
## 世界(Scene
Scene是ecs包含系统和实体最外面的容器。
## 实体(Entity
实体只由系统处理。
## 组件(Component)
组件应该只包含数据而没有逻辑代码。对数据进行逻辑是系统的工作。
## 系统(System
ecs中的系统会不断的更新实体。系统使用过滤器选择某些实体,然后仅更新那些选择的实体。
## 作者其他库(egret
- [x] [行为树/实用AI 系统](https://github.com/esengine/egret-BehaviourTree-ai)
- [行为树/实用AI 系统](https://github.com/esengine/egret-BehaviourTree-ai)
+1
View File
@@ -0,0 +1 @@
theme: jekyll-theme-slate
-29
View File
@@ -1,29 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Wing Player",
"type": "chrome",
"request": "launch",
"file": "index.html",
"runtimeExecutable": "${execPath}",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"port":5479
},
{
"name": "Launch Chrome",
"type": "chrome",
"request": "launch",
"file": "index.html",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"userDataDir":"${tmpdir}",
"port":5479
}
]
}
-6
View File
@@ -1,6 +0,0 @@
{
"search.exclude": {
"**/bin-debug": true,
"**/bin-release": true
}
}
-34
View File
@@ -1,34 +0,0 @@
{
"version": "0.1.0",
"command": "egret",
"isShellCommand": true,
"suppressTaskName": true,
"tasks": [
{
"taskName": "build",
"showOutput": "always",
"args": [
"build",
"-sourcemap"
],
"problemMatcher": "$tsc"
},
{
"taskName": "clean",
"showOutput": "always",
"args": [
"build",
"-e"
],
"problemMatcher": "$tsc"
},
{
"taskName": "publish",
"showOutput": "always",
"args": [
"publish"
],
"problemMatcher": "$tsc"
}
]
}
+5 -2
View File
@@ -24,13 +24,16 @@
{
"name": "promise"
},
{
"name": "dragonBones"
},
{
"name": "framework",
"path": "./libs/framework"
},
{
"name": "long",
"path": "./libs/long"
"name": "fairygui",
"path": "./libs/fairygui"
}
]
}
+2 -2
View File
@@ -27,7 +27,7 @@
data-entry-class="Main"
data-orientation="auto"
data-scale-mode="fixedWidth"
data-frame-rate="30"
data-frame-rate="60"
data-content-width="640"
data-content-height="1136"
data-multi-fingered="2"
@@ -77,7 +77,7 @@
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret.runEgret({ renderMode: "canvas", audioType: 0, calculateCanvasScaleFactor:function(context) {
egret.runEgret({ renderMode: "webgl", audioType: 0, calculateCanvasScaleFactor:function(context) {
var backingStore = context.backingStorePixelRatio ||
context.webkitBackingStorePixelRatio ||
context.mozBackingStorePixelRatio ||
+261 -269
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+2171 -510
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
-1092
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+35 -10
View File
@@ -7,20 +7,45 @@
"libs/modules/game/game.js",
"libs/modules/tween/tween.js",
"libs/modules/promise/promise.js",
"libs/modules/dragonBones/dragonBones.js",
"libs/framework/framework.js",
"libs/long/long.js"
"libs/fairygui/fairygui.js"
],
"game": [
"bin-debug/game/CoreEmitterType.js",
"bin-debug/AssetAdapter.js",
"bin-debug/Main.js",
"bin-debug/Fgui/common/commonBinder.js",
"bin-debug/UI/mvc/BaseView.js",
"bin-debug/SampleHelpers/SampleScene.js",
"bin-debug/Scenes/Ninja Adventure/ProjectileHitDetector.js",
"bin-debug/UI/loading/LoadingView.js",
"bin-debug/Scenes/Ninja Adventure/CameraBounds.js",
"bin-debug/Fgui/loading/loadingBinder.js",
"bin-debug/Fgui/loading/UI_View_loading.js",
"bin-debug/Fgui/sc/scBinder.js",
"bin-debug/Fgui/sc/UI_btn_sc.js",
"bin-debug/Fgui/sc/UI_combo_sc_popup.js",
"bin-debug/Fgui/sc/UI_View_sc.js",
"bin-debug/Platform.js",
"bin-debug/Scenes/Animated Tiles/AnimatedTilesScene.js",
"bin-debug/Scenes/Empty Scene/BasicScene.js",
"bin-debug/Scenes/LineCasting/LineCaster.js",
"bin-debug/Scenes/LineCasting/LineCastingScene.js",
"bin-debug/Main.js",
"bin-debug/Scenes/Ninja Adventure/FireballProjectileController.js",
"bin-debug/Scenes/Ninja Adventure/Ninja.js",
"bin-debug/Scenes/Ninja Adventure/NinjaAdventureScene.js",
"bin-debug/ThemeAdapter.js",
"bin-debug/LoadingUI.js",
"bin-debug/game/MainScene.js",
"bin-debug/game/PlayerController.js",
"bin-debug/game/SimplePooled.js",
"bin-debug/game/SpawnerComponent.js",
"bin-debug/game/SpawnerSystem.js"
"bin-debug/UI/PopManager.js",
"bin-debug/UI/loading/LoadingControl.js",
"bin-debug/UI/loading/LoadingEvents.js",
"bin-debug/AssetAdapter.js",
"bin-debug/Fgui/common/UI_com_tips.js",
"bin-debug/UI/mvc/EventManager.js",
"bin-debug/UI/mvc/Extension.js",
"bin-debug/UI/mvc/FguiUtils.js",
"bin-debug/UI/mvc/LayerManager.js",
"bin-debug/UI/mvc/ViewManager.js",
"bin-debug/UI/sc/ScControl.js",
"bin-debug/UI/sc/ScEvents.js",
"bin-debug/UI/sc/ScView.js"
]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

-5
View File
@@ -1,5 +0,0 @@
[
"<font color=0x00ff0c>Open-source</font>,<font color=0x00ff0c>Free</font>,<font color=0x00ff0c>Multi-platform</font>",
"Push <font color=0x00ff0c>Game </font>Forward",
"<font color=0x00ff0c>HTML5 </font>Game Engine"
]
+67 -86
View File
@@ -1,140 +1,121 @@
{
"groups": [
{
"keys": "checkbox_select_disabled_png,checkbox_select_down_png,checkbox_select_up_png,checkbox_unselect_png,selected_png,border_png,header_png,radiobutton_select_disabled_png,radiobutton_select_down_png,radiobutton_select_up_png,radiobutton_unselect_png,roundthumb_png,thumb_png,track_png,tracklight_png,handle_png,off_png,on_png,button_down_png,button_up_png,thumb_pb_png,track_pb_png,track_sb_png,bg_jpg,egret_icon_png,description_json",
"keys": "bg_png,bgNorm_png,moon_png,orange_png,moonNorm_png,orangeNorm_png,tiledMap_json,orthogonal-outside_json,tilemap_json,plume_png",
"name": "preload"
},
{
"keys": "loading",
"name": "loading"
},
{
"keys": "sc",
"name": "sc"
},
{
"keys": "common",
"name": "common"
},
{
"keys": "1_png,2_png,3_png,4_png,5_png,6_png",
"name": "characters"
}
],
"resources": [
{
"url": "assets/CheckBox/checkbox_select_disabled.png",
"url": "preload/bg.png",
"type": "image",
"name": "checkbox_select_disabled_png"
"name": "bg_png"
},
{
"url": "assets/CheckBox/checkbox_select_down.png",
"url": "preload/bgNorm.png",
"type": "image",
"name": "checkbox_select_down_png"
"name": "bgNorm_png"
},
{
"url": "assets/CheckBox/checkbox_select_up.png",
"url": "preload/moon.png",
"type": "image",
"name": "checkbox_select_up_png"
"name": "moon_png"
},
{
"url": "assets/CheckBox/checkbox_unselect.png",
"url": "preload/orange.png",
"type": "image",
"name": "checkbox_unselect_png"
"name": "orange_png"
},
{
"url": "assets/ItemRenderer/selected.png",
"url": "preload/moonNorm.png",
"type": "image",
"name": "selected_png"
"name": "moonNorm_png"
},
{
"url": "assets/Panel/border.png",
"url": "preload/orangeNorm.png",
"type": "image",
"name": "border_png"
"name": "orangeNorm_png"
},
{
"url": "assets/Panel/header.png",
"url": "characters/1.png",
"type": "image",
"name": "header_png"
"name": "1_png"
},
{
"url": "assets/RadioButton/radiobutton_select_disabled.png",
"url": "characters/2.png",
"type": "image",
"name": "radiobutton_select_disabled_png"
"name": "2_png"
},
{
"url": "assets/RadioButton/radiobutton_select_down.png",
"url": "characters/3.png",
"type": "image",
"name": "radiobutton_select_down_png"
"name": "3_png"
},
{
"url": "assets/RadioButton/radiobutton_select_up.png",
"url": "characters/4.png",
"type": "image",
"name": "radiobutton_select_up_png"
"name": "4_png"
},
{
"url": "assets/RadioButton/radiobutton_unselect.png",
"url": "characters/5.png",
"type": "image",
"name": "radiobutton_unselect_png"
"name": "5_png"
},
{
"url": "assets/ScrollBar/roundthumb.png",
"url": "characters/6.png",
"type": "image",
"name": "roundthumb_png"
"name": "6_png"
},
{
"url": "assets/Slider/thumb.png",
"type": "image",
"name": "thumb_png"
"url": "fgui/common.zip",
"type": "bin",
"name": "common"
},
{
"url": "assets/Slider/track.png",
"type": "image",
"name": "track_png"
"url": "fgui/sc.zip",
"type": "bin",
"name": "sc"
},
{
"url": "assets/Slider/tracklight.png",
"type": "image",
"name": "tracklight_png"
"url": "fgui/loading.zip",
"type": "bin",
"name": "loading"
},
{
"url": "assets/ToggleSwitch/handle.png",
"type": "image",
"name": "handle_png"
},
{
"url": "assets/ToggleSwitch/off.png",
"type": "image",
"name": "off_png"
},
{
"url": "assets/ToggleSwitch/on.png",
"type": "image",
"name": "on_png"
},
{
"url": "assets/Button/button_down.png",
"type": "image",
"name": "button_down_png"
},
{
"url": "assets/Button/button_up.png",
"type": "image",
"name": "button_up_png"
},
{
"url": "assets/ProgressBar/thumb_pb.png",
"type": "image",
"name": "thumb_pb_png"
},
{
"url": "assets/ProgressBar/track_pb.png",
"type": "image",
"name": "track_pb_png"
},
{
"url": "assets/ScrollBar/track_sb.png",
"type": "image",
"name": "track_sb_png"
},
{
"url": "assets/bg.jpg",
"type": "image",
"name": "bg_jpg"
},
{
"url": "assets/egret_icon.png",
"type": "image",
"name": "egret_icon_png"
},
{
"name": "description_json",
"url": "preload/caveman/tiledMap.json",
"type": "json",
"url": "config/description.json"
"name": "tiledMap_json"
},
{
"url": "preload/orthogonal/orthogonal-outside.json",
"type": "json",
"name": "orthogonal-outside_json"
},
{
"url": "preload/ninja/tilemap.json",
"type": "json",
"name": "tilemap_json"
},
{
"url": "preload/plume.png",
"type": "image",
"name": "plume_png"
}
]
}
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<e:Skin class="skins.ButtonSkin" states="up,down,disabled" minHeight="50" minWidth="100" xmlns:e="http://ns.egret.com/eui">
<e:Image width="100%" height="100%" scale9Grid="1,3,8,8" alpha.disabled="0.5"
source="button_up_png"
source.down="button_down_png"/>
<e:Label id="labelDisplay" top="8" bottom="8" left="8" right="8"
size="20"
textColor="0xFFFFFF" verticalAlign="middle" textAlign="center"/>
<e:Image id="iconDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.CheckBoxSkin" states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected" xmlns:e="http://ns.egret.com/eui">
<e:Group width="100%" height="100%">
<e:layout>
<e:HorizontalLayout verticalAlign="middle"/>
</e:layout>
<e:Image fillMode="scale" alpha="1" alpha.disabled="0.5" alpha.down="0.7"
source="checkbox_unselect_png"
source.upAndSelected="checkbox_select_up_png"
source.downAndSelected="checkbox_select_down_png"
source.disabledAndSelected="checkbox_select_disabled_png"/>
<e:Label id="labelDisplay" size="20" textColor="0x707070"
textAlign="center" verticalAlign="middle"
fontFamily="Tahoma"/>
</e:Group>
</e:Skin>
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.HScrollBarSkin" minWidth="20" minHeight="8" xmlns:e="http://ns.egret.com/eui">
<e:Image id="thumb" source="roundthumb_png" scale9Grid="3,3,2,2" height="8" width="30" verticalCenter="0"/>
</e:Skin>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.HSliderSkin" minWidth="20" minHeight="8" xmlns:e="http://ns.egret.com/eui">
<e:Image id="track" source="track_sb_png" scale9Grid="1,1,4,4" width="100%"
height="6" verticalCenter="0"/>
<e:Image id="thumb" source="thumb_png" verticalCenter="0"/>
</e:Skin>
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<e:Skin class="skins.ItemRendererSkin" states="up,down,disabled" minHeight="50" minWidth="100" xmlns:e="http://ns.egret.com/eui">
<e:Image width="100%" height="100%" scale9Grid="1,3,8,8" alpha.disabled="0.5"
source="button_up_png"
source.down="button_down_png"/>
<e:Label id="labelDisplay" top="8" bottom="8" left="8" right="8"
size="20" fontFamily="Tahoma"
textColor="0xFFFFFF" text="{data}" verticalAlign="middle" textAlign="center"/>
</e:Skin>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.PanelSkin" minHeight="230" minWidth="450" xmlns:e="http://ns.egret.com/eui">
<e:Image left="0" right="0" bottom="0" top="0" source="border_png" scale9Grid="2,2,12,12" />
<e:Group id="moveArea" left="0" right="0" top="0" height="45">
<e:Image left="0" right="0" bottom="0" top="0" source="header_png"/>
<e:Label id="titleDisplay" size="20" fontFamily="Tahoma" textColor="0xFFFFFF"
wordWrap="false" left="15" right="5" verticalCenter="0"/>
</e:Group>
<e:Button id="closeButton" label="close" bottom="5" horizontalCenter="0"/>
</e:Skin>
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.ProgressBarSkin" minWidth="30" minHeight="18" xmlns:e="http://ns.egret.com/eui">
<e:Image source="track_pb_png" scale9Grid="1,1,4,4" width="100%"
height="100%" verticalCenter="0"/>
<e:Image id="thumb" height="100%" width="100%" source="thumb_pb_png"/>
<e:Label id="labelDisplay" textAlign="center" verticalAlign="middle"
size="15" fontFamily="Tahoma" textColor="0x707070"
horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.RadioButtonSkin" states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected" xmlns:e="http://ns.egret.com/eui">
<e:Group width="100%" height="100%">
<e:layout>
<e:HorizontalLayout verticalAlign="middle"/>
</e:layout>
<e:Image fillMode="scale" alpha="1" alpha.disabled="0.5" alpha.down="0.7"
source="radiobutton_unselect_png"
source.upAndSelected="radiobutton_select_up_png"
source.downAndSelected="radiobutton_select_down_png"
source.disabledAndSelected="radiobutton_select_disabled_png"/>
<e:Label id="labelDisplay" size="20" textColor="0x707070"
textAlign="center" verticalAlign="middle"
fontFamily="Tahoma"/>
</e:Group>
</e:Skin>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.ScrollerSkin" minWidth="20" minHeight="20" xmlns:e="http://ns.egret.com/eui">
<e:HScrollBar id="horizontalScrollBar" width="100%" bottom="0"/>
<e:VScrollBar id="verticalScrollBar" height="100%" right="0"/>
</e:Skin>
@@ -1,9 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<e:Skin class="skins.TextInputSkin" minHeight="40" minWidth="300" states="normal,disabled,normalWithPrompt,disabledWithPrompt" xmlns:e="http://ns.egret.com/eui">
<e:Image width="100%" height="100%" scale9Grid="1,3,8,8" source="button_up_png"/>
<e:Rect height="100%" width="100%" fillColor="0xffffff"/>
<e:EditableText id="textDisplay" verticalCenter="0" left="10" right="10"
textColor="0x000000" textColor.disabled="0xff0000" width="100%" height="24" size="20" />
<e:Label id="promptDisplay" verticalCenter="0" left="10" right="10"
textColor="0xa9a9a9" width="100%" height="24" size="20" touchEnabled="false" includeIn="normalWithPrompt,disabledWithPrompt"/>
</e:Skin>
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.ToggleSwitchSkin" states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected" xmlns:e="http://ns.egret.com/eui">
<e:Image source="on_png"
source.up="off_png"
source.down="off_png"
source.disabled="off_png"/>
<e:Image source="handle_png"
horizontalCenter="-18"
horizontalCenter.upAndSelected="18"
horizontalCenter.downAndSelected="18"
horizontalCenter.disabledAndSelected="18"
verticalCenter="0"/>
</e:Skin>
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.VScrollBarSkin" minWidth="8" minHeight="20" xmlns:e="http://ns.egret.com/eui">
<e:Image id="thumb" source="roundthumb_png" scale9Grid="3,3,2,2" height="30" width="8" horizontalCenter="0"/>
</e:Skin>
-5
View File
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="skins.VSliderSkin" minWidth="25" minHeight="30" xmlns:e="http://ns.egret.com/eui">
<e:Image id="track" source="track_png" scale9Grid="1,1,4,4" width="7" height="100%" horizontalCenter="0"/>
<e:Image id="thumb" source="thumb_png" horizontalCenter="0" />
</e:Skin>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+193
View File
@@ -0,0 +1,193 @@
{ "height":30,
"infinite":false,
"layers":[
{
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 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"draworder":"topdown",
"id":2,
"name":"objects",
"objects":[
{
"height":14.8796,
"id":6,
"name":"spawn",
"rotation":0,
"type":"",
"visible":true,
"width":14.8796,
"x":48.4346,
"y":240.503
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextlayerid":3,
"nextobjectid":7,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.2.1",
"tileheight":16,
"tilesets":[
{
"columns":2,
"firstgid":1,
"image":"tileset.png",
"imageheight":32,
"imagewidth":32,
"margin":0,
"name":"tileset",
"spacing":0,
"tilecount":4,
"tileheight":16,
"tiles":[
{
"id":0,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":16,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":16,
"x":0,
"y":0
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":2,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":3,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":16,
"x":0,
"y":0
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
"properties":[
{
"name":"filewtf",
"type":"file",
"value":""
},
{
"name":"floaty",
"type":"float",
"value":0
},
{
"name":"inty",
"type":"int",
"value":0
},
{
"name":"nez:isOneWayPlatform",
"type":"bool",
"value":true
},
{
"name":"poop",
"type":"color",
"value":""
}]
},
{
"id":3,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":0,
"id":1,
"name":"",
"polygon":[
{
"x":0,
"y":0
},
{
"x":0,
"y":16
},
{
"x":16,
"y":16
}],
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":0,
"y":0
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
"properties":[
{
"name":"nez:isSlope",
"type":"bool",
"value":true
},
{
"name":"nez:slopeTopLeft",
"type":"int",
"value":0
},
{
"name":"nez:slopeTopRight",
"type":"int",
"value":15
}]
}],
"tilewidth":16
}],
"tilewidth":16,
"type":"map",
"version":1.2,
"width":40
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+3
View File
@@ -44,6 +44,9 @@ export class WxgamePlugin implements plugins.Command {
if (filename == 'main.js') {
content += "\n;window.Main = Main;"
}
if (filename == 'libs/long/long.js' || filename == 'libs/long/long.min.js'){
content += "window.Long = long;"
}
this.md5Obj[path.basename(filename)] = this.md5(content)
file.contents = new Buffer(content);
}
+19
View File
@@ -0,0 +1,19 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.common {
export class UI_com_tips extends fairygui.GComponent {
public m_content:fairygui.GTextField;
public static URL:string = "ui://minsdstak7mf0";
public static createInstance():UI_com_tips {
return <UI_com_tips>(fairygui.UIPackage.createObject("common", "com_tips"));
}
protected constructFromXML(xml:any):void {
super.constructFromXML(xml);
this.m_content = <fairygui.GTextField>(this.getChildAt(1));
}
}
}
+10
View File
@@ -0,0 +1,10 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.common {
export class commonBinder {
public static bindAll():void {
fairygui.UIObjectFactory.setPackageItemExtension(UI_com_tips.URL, UI_com_tips);
}
}
}
+21
View File
@@ -0,0 +1,21 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.loading {
export class UI_View_loading extends fairygui.GComponent {
public m_title:fairygui.GTextField;
public m_pg_loading:fairygui.GProgressBar;
public static URL:string = "ui://mk2d64e7r5ro0";
public static createInstance():UI_View_loading {
return <UI_View_loading>(fairygui.UIPackage.createObject("loading", "View_loading"));
}
protected constructFromXML(xml:any):void {
super.constructFromXML(xml);
this.m_title = <fairygui.GTextField>(this.getChildAt(1));
this.m_pg_loading = <fairygui.GProgressBar>(this.getChildAt(2));
}
}
}
+10
View File
@@ -0,0 +1,10 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.loading {
export class loadingBinder {
public static bindAll():void {
fairygui.UIObjectFactory.setPackageItemExtension(UI_View_loading.URL, UI_View_loading);
}
}
}
+21
View File
@@ -0,0 +1,21 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.sc {
export class UI_View_sc extends fairygui.GComponent {
public m_list_sc:fairygui.GList;
public m_combo_transition:fairygui.GComboBox;
public static URL:string = "ui://m4sln17ak7mf0";
public static createInstance():UI_View_sc {
return <UI_View_sc>(fairygui.UIPackage.createObject("sc", "View_sc"));
}
protected constructFromXML(xml:any):void {
super.constructFromXML(xml);
this.m_list_sc = <fairygui.GList>(this.getChildAt(0));
this.m_combo_transition = <fairygui.GComboBox>(this.getChildAt(1));
}
}
}
+19
View File
@@ -0,0 +1,19 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.sc {
export class UI_btn_sc extends fairygui.GButton {
public m_name:fairygui.GTextField;
public static URL:string = "ui://m4sln17ak7mf2";
public static createInstance():UI_btn_sc {
return <UI_btn_sc>(fairygui.UIPackage.createObject("sc", "btn_sc"));
}
protected constructFromXML(xml:any):void {
super.constructFromXML(xml);
this.m_name = <fairygui.GTextField>(this.getChildAt(3));
}
}
}
+19
View File
@@ -0,0 +1,19 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.sc {
export class UI_combo_sc_popup extends fairygui.GComponent {
public m_list:fairygui.GList;
public static URL:string = "ui://m4sln17ajde14";
public static createInstance():UI_combo_sc_popup {
return <UI_combo_sc_popup>(fairygui.UIPackage.createObject("sc", "combo_sc_popup"));
}
protected constructFromXML(xml:any):void {
super.constructFromXML(xml);
this.m_list = <fairygui.GList>(this.getChildAt(1));
}
}
}
+12
View File
@@ -0,0 +1,12 @@
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
module FUI.sc {
export class scBinder {
public static bindAll():void {
fairygui.UIObjectFactory.setPackageItemExtension(UI_combo_sc_popup.URL, UI_combo_sc_popup);
fairygui.UIObjectFactory.setPackageItemExtension(UI_View_sc.URL, UI_View_sc);
fairygui.UIObjectFactory.setPackageItemExtension(UI_btn_sc.URL, UI_btn_sc);
}
}
}
-51
View File
@@ -1,51 +0,0 @@
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
class LoadingUI extends egret.Sprite implements RES.PromiseTaskReporter {
public constructor() {
super();
this.createView();
}
private textField: egret.TextField;
private createView(): void {
this.textField = new egret.TextField();
this.addChild(this.textField);
this.textField.y = 300;
this.textField.width = 480;
this.textField.height = 100;
this.textField.textAlign = "center";
}
public onProgress(current: number, total: number): void {
this.textField.text = `Loading...${current}/${total}`;
}
}
+31 -69
View File
@@ -27,82 +27,44 @@
//
//////////////////////////////////////////////////////////////////////////////////////
import LoadingView = loading.LoadingView;
class Main extends eui.UILayer {
public static emitter: Emitter<CoreEmitterType>;
public static manager: SceneManager;
protected createChildren(): void {
super.createChildren();
egret.lifecycle.addLifecycleListener((context) => {
// custom lifecycle plugin
})
egret.lifecycle.onPause = () => {
egret.ticker.pause();
}
egret.lifecycle.onResume = () => {
egret.ticker.resume();
}
//inject the custom material parser
//注入自定义的素材解析器
let assetAdapter = new AssetAdapter();
egret.registerImplementation("eui.IAssetAdapter", assetAdapter);
egret.registerImplementation("eui.IThemeAdapter", new ThemeAdapter());
Main.manager = new SceneManager(this.stage);
Main.emitter = new Emitter<CoreEmitterType>();
this.addEventListener(egret.Event.ENTER_FRAME, this.updateFrame, this);
this.runGame();
}
private updateFrame(evt: egret.Event){
Main.emitter.emit(CoreEmitterType.Update, evt);
}
private async runGame() {
await this.loadResource();
this.createGameScene();
}
private async loadResource() {
class Main extends es.Core {
protected initialize() {
try {
const loadingView = new LoadingUI();
this.stage.addChild(loadingView);
await RES.loadConfig("resource/default.res.json", "resource/");
await this.loadTheme();
await RES.loadGroup("preload", 0, loadingView);
this.stage.removeChild(loadingView);
}
catch (e) {
console.error(e);
es.Core.debugRenderEndabled = true;
es.TimeRuler.Instance.showLog = true;
this.runGame();
} catch(err) {
console.error(err);
}
}
private loadTheme() {
return new Promise((resolve, reject) => {
// load skin theme configuration file, you can manually modify the file. And replace the default skin.
//加载皮肤主题配置文件,可以手动修改这个文件。替换默认皮肤。
let theme = new eui.Theme("resource/default.thm.json", this.stage);
theme.addEventListener(eui.UIEvent.COMPLETE, () => {
resolve();
}, this);
})
private runGame() {
egret.ImageLoader.crossOrigin = "anonymous";
this.initUIConfig();
this.loadResource();
this.initGameControl();
}
/**
*
* Create scene interface
*/
protected createGameScene(): void {
SceneManager.scene = new MainScene();
private initUIConfig(){
LayerManager.getInstance().init(this.stage);
FguiUtils.packageNamespace = FUI;
fairygui.UIConfig.defaultFont = "黑体";
fairygui.UIConfig.bringWindowToFrontOnClick = false;
this.stage.addChild(fgui.GRoot.inst.displayListContainer);
}
// Main.emitter.addObserver(CoreEmitterType.Update, ()=>{
// console.log("update emitter");
// });
private loadResource() {
RES.loadConfig("resource/default.res.json", "resource/").then(()=>{
EventManager.getInstance().dispatch(loading.LoadingEvents.OPENVIEW);
}).catch(err =>{
console.error(err);
});
}
private initGameControl(){
loading.LoadingControl.getInstance();
sc.ScControl.getInstance();
}
}
+27
View File
@@ -0,0 +1,27 @@
module samples {
import ScreenSpaceRenderer = es.ScreenSpaceRenderer;
import RenderLayerExcludeRenderer = es.RenderLayerExcludeRenderer;
import SpriteRenderer = es.SpriteRenderer;
export class SampleScene extends es.Scene {
public static readonly screenSpaceRenderLayer = 999;
public static _needsFullRender: boolean;
public _screenSpaceRenderer: ScreenSpaceRenderer;
constructor(addExcludeRenderer: boolean = true, needsFullRender: boolean = false){
super();
SampleScene._needsFullRender = needsFullRender;
if (needsFullRender){
this._screenSpaceRenderer = this.addRenderer(new ScreenSpaceRenderer(100, SampleScene.screenSpaceRenderLayer));
this._screenSpaceRenderer.shouldDebugRender = false;
}else{
this.addRenderer(new ScreenSpaceRenderer(100, SampleScene.screenSpaceRenderLayer));
}
if (addExcludeRenderer)
this.addRenderer(new RenderLayerExcludeRenderer(0, SampleScene.screenSpaceRenderLayer));
}
}
}
@@ -0,0 +1,21 @@
module samples {
export class AnimatedTilesScene extends SampleScene {
constructor(){
super(true, true);
}
public initialize(){
super.initialize();
let tiledEntity = this.createEntity("tiled-map-entity");
try {
es.TiledMapLoader.loadTmxMap(new es.TmxMap(), "orthogonal-outside_json").then(map => {
tiledEntity.addComponent(new es.TiledMapRenderer(map));
manager.AlterManager.alter_tips("Tiled tiles场景加载成功");
});
} catch (err){
console.error(err);
}
}
}
}
+25
View File
@@ -0,0 +1,25 @@
module samples {
export class BasicScene extends SampleScene {
public async onStart() {
super.onStart();
manager.AlterManager.alter_tips("空白场景加载成功");
this.content.loadRes("moon_png").then(moonTexture => {
let moonEntity = this.createEntity("moon");
moonEntity.position = new es.Vector2(0, 0);
moonEntity.addComponent(new es.SpriteRenderer(moonTexture));
this.camera.entity.addComponent(new es.FollowCamera(moonEntity));
});
}
public update(){
super.update();
let moonEntity = this.findEntity("moon");
if (!moonEntity)
return;
let spriteRenderer = moonEntity.getComponent<es.SpriteRenderer>(es.SpriteRenderer);
console.log(spriteRenderer.bounds, this.camera.bounds);
}
}
}
+89
View File
@@ -0,0 +1,89 @@
module samples {
import RenderableComponent = es.RenderableComponent;
import Vector2 = es.Vector2;
import Physics = es.Physics;
export class LineCaster extends RenderableComponent {
private _lastPosition = new Vector2(101, 101);
private _collisionPosition = new Vector2(-1, -1);
private _pixelShape1: egret.Shape;
private _pixelShape2: egret.Shape;
private _lineShape: egret.Shape;
private _pixelShape3: egret.Shape;
private _delayTime = 0.2;
private _pressTime = 0;
private _canTouch = true;
public get width(){
return 1000;
}
public get height(){
return 1000;
}
constructor() {
super();
this._pixelShape1 = new egret.Shape();
this._pixelShape2 = new egret.Shape();
this._lineShape = new egret.Shape();
this._pixelShape3 = new egret.Shape();
this.displayObject = new egret.DisplayObjectContainer();
let displayContainer = this.displayObject as egret.DisplayObjectContainer;
displayContainer.addChild(this._pixelShape1);
displayContainer.addChild(this._pixelShape2);
displayContainer.addChild(this._pixelShape3);
displayContainer.addChild(this._lineShape);
}
public render(camera: es.Camera): any {
this._pixelShape1.graphics.clear();
this._pixelShape1.graphics.beginFill(0xffff00);
this._pixelShape1.graphics.lineStyle(4, 0xffff00);
this._pixelShape1.graphics.moveTo(this._lastPosition.x, this._lastPosition.y);
this._pixelShape1.graphics.endFill();
this._pixelShape2.graphics.clear();
this._pixelShape2.graphics.beginFill(0xffffff);
this._pixelShape2.graphics.lineStyle(4, 0xffffff);
this._pixelShape2.graphics.moveTo(this.transform.position.x, this.transform.position.y);
this._pixelShape2.graphics.endFill();
this._lineShape.graphics.clear();
this._lineShape.graphics.beginFill(0xffffff);
this._lineShape.graphics.lineStyle(1, 0xffffff);
this._lineShape.graphics.moveTo(this._lastPosition.x, this._lastPosition.y);
this._lineShape.graphics.lineTo(this.transform.position.x, this.transform.position.y);
this._lineShape.graphics.endFill();
this._pixelShape3.graphics.clear();
if (this._collisionPosition.x > 0 && this._collisionPosition.y > 0){
this._pixelShape3.graphics.beginFill(0xff0000);
this._pixelShape3.graphics.lineStyle(10, 0xff0000);
this._pixelShape3.graphics.moveTo(this._collisionPosition.x, this._collisionPosition.y);
this._pixelShape3.graphics.endFill();
}
}
public update(): void {
if (!this._canTouch){
if (this._pressTime > this._delayTime){
this._canTouch = true;
this._pressTime = 0;
}else{
this._pressTime += es.Time.deltaTime;
}
return;
}
if (!es.Input.touchPosition.equals(Vector2.zero)){
this._lastPosition = this.transform.position;
this.transform.position = es.Input.touchPosition;
this._collisionPosition = new Vector2(-1, -1);
this._canTouch = false;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More