Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-development-tutorial
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
game-development-tutorial
Commits
6046baaa
Commit
6046baaa
authored
Oct 16, 2018
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update hello-world.md
parent
39a8dc77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
hello-world.md
hello-world.md
+2
-2
No files found.
hello-world.md
View file @
6046baaa
...
...
@@ -41,7 +41,7 @@ class Main extends egret.DisplayObjectContainer {
window
[
'Main'
]
=
Main
;
```
最后我们
用下面的代码
来启动引擎。
最后我们
把下面的代码放入
`main.js`
尾部
来启动引擎。
```
js
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
...
...
@@ -57,5 +57,5 @@ egret.runEgret({
```
## 运行代码
我们用chrome来运行
`index.html`
便可以看到在画布上出现了红色的
`hello world`
字样。运行结果如下图。
我们用chrome来运行
`index.html`
便可以看到在画布上出现了红色的
`hello world`
字样。运行结果如下图。
完整的源码请见:http://gitlab2.dui88.com/wanghongyuan/egret-hello-world。
![
avatar
](
http://yun.duiba.com.cn/db_games/game-development-tutorial/hello_egret.png
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment