Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
learn-phaser
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
learn-phaser
Commits
f9dead57
Commit
f9dead57
authored
Apr 19, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2a9be4b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
38 deletions
+24
-38
index.html
dogborn/dist/index.html
+1
-2
index.ts
dogborn/src/index.ts
+23
-8
main.ts
dogborn/src/main.ts
+0
-28
No files found.
dogborn/dist/index.html
View file @
f9dead57
...
...
@@ -2,8 +2,7 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1.0,user-scalable=no"
>
<title>
Document
</title>
</head>
<body>
...
...
dogborn/src/index.ts
View file @
f9dead57
import
Piece
from
'./Piece'
;
import
Scene
from
'./Scene'
;
let
gameconfig
=
{
type
:
Phaser
.
AUTO
,
width
:
800
,
height
:
600
,
scene
:
{
preload
:
preload
,
create
:
create
,
update
:
update
}
};
const
stage
=
new
createjs
.
StageGL
(
'gameCanvas'
);
let
game
=
new
Phaser
.
Game
(
gameconfig
);
const
scene
=
new
Scene
();
function
preload
()
{
this
.
load
.
image
(
'back'
,
'assets/back.png'
);
this
.
load
.
image
(
'bone'
,
'assets/bone.png'
);
this
.
load
.
image
(
'front'
,
'assets/front.png'
);
}
stage
.
addChild
(
scene
);
function
create
()
{
this
.
add
.
image
(
106
,
106
,
'back'
);
// this.add.image(400, 300, 'bone');
}
createjs
.
Ticker
.
on
(
'tick'
,
()
=>
{
stage
.
update
()
});
``
\ No newline at end of file
function
update
()
{
//
}
\ No newline at end of file
dogborn/src/main.ts
deleted
100644 → 0
View file @
2a9be4b5
let
gameconfig
=
{
type
:
Phaser
.
AUTO
,
width
:
800
,
height
:
600
,
scene
:
{
preload
:
preload
,
create
:
create
,
update
:
update
}
};
let
game
=
new
Phaser
.
Game
(
gameconfig
);
function
preload
()
{
this
.
load
.
image
(
'sky'
,
'assets/sky.png'
);
this
.
load
.
image
(
'ground'
,
'assets/platform.png'
);
this
.
load
.
image
(
'star'
,
'assets/star.png'
);
this
.
load
.
image
(
'bomb'
,
'assets/bomb.png'
);
}
function
create
()
{
this
.
add
.
image
(
400
,
300
,
'sky'
);
this
.
add
.
image
(
400
,
300
,
'star'
);
}
function
update
()
{
//
}
\ 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