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
ceef6321
Commit
ceef6321
authored
Sep 03, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds helpers to bosses at level 2 & 3 and above in demo game
parent
bf179674
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
game_object_factory.dart
examples/game/lib/game_object_factory.dart
+18
-0
No files found.
examples/game/lib/game_object_factory.dart
View file @
ceef6321
...
...
@@ -46,11 +46,29 @@ class GameObjectFactory {
}
void
addBossFight
(
int
l
,
double
yPos
)
{
// Add boss
EnemyBoss
boss
=
new
EnemyBoss
(
this
);
Point
pos
=
new
Point
(
0.0
,
yPos
+
_chunkSpacing
/
2.0
);
addGameObject
(
boss
,
pos
);
playerState
.
boss
=
boss
;
// Add boss's helpers
if
(
l
>=
1
)
{
EnemyDestroyer
destroyer0
=
new
EnemyDestroyer
(
this
);
addGameObject
(
destroyer0
,
new
Point
(-
80.0
,
yPos
+
_chunkSpacing
/
2.0
+
70.0
));
EnemyDestroyer
destroyer1
=
new
EnemyDestroyer
(
this
);
addGameObject
(
destroyer1
,
new
Point
(
80.0
,
yPos
+
_chunkSpacing
/
2.0
+
70.0
));
if
(
l
>=
2
)
{
EnemyDestroyer
destroyer0
=
new
EnemyDestroyer
(
this
);
addGameObject
(
destroyer0
,
new
Point
(-
80.0
,
yPos
+
_chunkSpacing
/
2.0
-
70.0
));
EnemyDestroyer
destroyer1
=
new
EnemyDestroyer
(
this
);
addGameObject
(
destroyer1
,
new
Point
(
80.0
,
yPos
+
_chunkSpacing
/
2.0
-
70.0
));
}
}
}
}
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