Compare commits
126 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 358e899e8b | |||
| 7a308f76b6 | |||
| a3c53116e1 | |||
| d07912d610 | |||
| e81f98ff17 | |||
| 1997b3f348 | |||
| 0ab0728ddf | |||
| 46a8de39e3 | |||
| 794e33a0a0 | |||
| 0bb09f6442 | |||
| 27dea50026 | |||
| a39677062c | |||
| 27f9e78fe5 | |||
| fc0a46d6a8 | |||
| 7345a17d24 | |||
| 6c1cfec928 | |||
| 73f0f54ba7 | |||
| 24705d24f1 | |||
| 646d1806ec | |||
| 6d4d787530 | |||
| 66ef4c6597 | |||
| f7ee2c8d1c | |||
| b3961d8ea1 | |||
| 1a2dd9ff2a | |||
| 21e33495d8 | |||
| 23a45bfd2d | |||
| 593cc83012 | |||
| f0b2d5b9b8 | |||
| 5dc7a72310 | |||
| 89d05726ac | |||
| 15f6b06348 | |||
| a2a73562a0 | |||
| 9111b69cee | |||
| 4290a10d5d | |||
| b0511db001 | |||
| 4012a9f6d1 | |||
| e5805960e0 | |||
| 167ef03df6 | |||
| c89ed25d8a | |||
| 4baaa2629d | |||
| a3dbff63f0 | |||
| c6ef018d5e | |||
| 14b70b307c | |||
| a39b98b5d9 | |||
| 3492bbdf5e | |||
| 7d0bcbcb32 | |||
| c02a3aa071 | |||
| a105bb11ca | |||
| 3fbbba7ac2 | |||
| 7cd38ea54e | |||
| 42852c5dba | |||
| 6a3622a5ef | |||
| 03b568e28d | |||
| e7fb9e0d6b | |||
| 463c64c628 | |||
| 4025bc8554 | |||
| 1bf822725a | |||
| 359d7ae223 | |||
| c611e31f7e | |||
| 834ad565e1 | |||
| ab3f38c6a8 | |||
| d0199e357b | |||
| 8e3bcc1257 | |||
| a4fe9f5798 | |||
| c692f0157e | |||
| bc6626865e | |||
| 40fe7a57db | |||
| 514572f291 | |||
| 5994f0bee3 | |||
| b3e1f2c446 | |||
| ed13186779 | |||
| d730851d97 | |||
| 60921f703b | |||
| 506f8ddc0f | |||
| 149a3e5833 | |||
| 2b13e5ee7d | |||
| 6be43fc9ac | |||
| d4c244daf5 | |||
| 79c5d6990c | |||
| 347626a8ea | |||
| e61dd0c16b | |||
| 1b52bc5fd1 | |||
| 814234ca61 | |||
| 15c0844e29 | |||
| 5b8f414a45 | |||
| 6b8569b0b5 | |||
| 2a38858838 | |||
| e76d5815f2 | |||
| dccd4e21b6 | |||
| c96e8b3a04 | |||
| e686ba64d7 | |||
| 14cb9cd257 | |||
| 13e7737cb9 | |||
| dd65c60921 | |||
| 7dffb4d94a | |||
| 476204a296 | |||
| 983c8fbc99 | |||
| c30e591f6e | |||
| d9a1b5578c | |||
| f0e04b6981 | |||
| 14598f08c7 | |||
| 032b293085 | |||
| d9bb76c105 | |||
| 20392c8ab6 | |||
| 583e03d025 | |||
| f6c2d81a83 | |||
| e703ff4e6c | |||
| 877fc4c9bf | |||
| a80bb4b6f3 | |||
| 9b9d210109 | |||
| 817b703d4f | |||
| 88a25453e6 | |||
| 6e3eb1189a | |||
| 1e3b2763e8 | |||
| a3dacd04f0 | |||
| aea50926a9 | |||
| 299c1b8e7d | |||
| 3f6ab79894 | |||
| b14fee1685 | |||
| ace8fb685d | |||
| 1870ee5e45 | |||
| 8be65fa685 | |||
| cf4e76b12d | |||
| c156463f10 | |||
| e7796550c6 | |||
| c3c9181400 |
@@ -1,3 +1,9 @@
|
||||
/source/node_modules
|
||||
/demo/bin-debug
|
||||
/demo/bin-release
|
||||
/.idea
|
||||
/.vscode
|
||||
/demo_wxgame
|
||||
/demo/.wing
|
||||
/demo/.idea
|
||||
/demo/.vscode
|
||||
|
||||
@@ -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}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,52 +1,139 @@
|
||||
# egret-framework
|
||||
Cegret-framework
|
||||
|
||||
|
||||
[](https://lgtm.com/projects/g/esengine/egret-framework/context:javascript)
|
||||
|
||||
```
|
||||
[](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)
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-slate
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"search.exclude": {
|
||||
"**/bin-debug": true,
|
||||
"**/bin-release": true
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -24,13 +24,16 @@
|
||||
{
|
||||
"name": "promise"
|
||||
},
|
||||
{
|
||||
"name": "dragonBones"
|
||||
},
|
||||
{
|
||||
"name": "framework",
|
||||
"path": "./libs/framework"
|
||||
},
|
||||
{
|
||||
"name": "long",
|
||||
"path": "./libs/long"
|
||||
"name": "fairygui",
|
||||
"path": "./libs/fairygui"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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 ||
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 349 B |
|
Before Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 569 B |
|
Before Width: | Height: | Size: 458 B |
|
Before Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 933 B |
|
Before Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 444 B |
|
Before Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -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"
|
||||
]
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -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, 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, 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, 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, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 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, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2147483652, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2147483652, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2147483652, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2147483652, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 2147483652, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],
|
||||
"height":30,
|
||||
"id":1,
|
||||
"name":"main",
|
||||
"opacity":1,
|
||||
"type":"tilelayer",
|
||||
"visible":true,
|
||||
"width":40,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"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
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 770 B |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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}`;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||