Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
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
abdullh.alsoleman
Front-End
Commits
dbda2725
Commit
dbda2725
authored
Sep 03, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds coins when a boss explodes in demo game
parent
8c958f97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
game_objects.dart
examples/game/lib/game_objects.dart
+18
-0
No files found.
examples/game/lib/game_objects.dart
View file @
dbda2725
...
...
@@ -468,7 +468,25 @@ class EnemyBoss extends Obstacle {
void
destroy
()
{
f
.
playerState
.
boss
=
null
;
NodeWithSize
screen
=
f
.
playerState
.
parent
;
screen
.
addChild
(
new
Flash
(
screen
.
size
,
1.0
));
super
.
destroy
();
// Add coins
for
(
int
i
=
0
;
i
<
20
;
i
++)
{
Coin
coin
=
new
Coin
(
f
);
Point
pos
=
new
Point
(
randomSignedDouble
()
*
160
,
position
.
y
+
randomSignedDouble
()
*
160.0
);
f
.
addGameObject
(
coin
,
pos
);
}
}
Explosion
createExplosion
()
{
ExplosionBig
explo
=
new
ExplosionBig
(
f
.
sheet
);
explo
.
scale
=
1.5
;
return
explo
;
}
set
damage
(
double
d
)
{
...
...
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