Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proggy Gonzales
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik.Ingebrigtsen
Proggy Gonzales
Merge requests
!57
Sounds
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Sounds
sounds
into
master
Overview
0
Commits
3
Pipelines
0
Changes
13
Merged
Erik.Ingebrigtsen
requested to merge
sounds
into
master
2 years ago
Overview
0
Commits
3
Pipelines
0
Changes
13
Expand
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
007bfe9e
3 commits,
2 years ago
13 files
+
93
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
src/main/java/core/CollisionCheck.java
+
5
−
0
Options
@@ -52,10 +52,12 @@ public class CollisionCheck {
private
void
pickUpMoney
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
// Pick up 100 kroner
if
(
pickUpGeneric
(
x1
,
y1
,
x2
,
y2
,
7
))
{
gp
.
playSoundEffect
(
1
);
coins
+=
10
;
}
// pick up 200-kroner
if
(
pickUpGeneric
(
x1
,
y1
,
x2
,
y2
,
8
))
{
gp
.
playSoundEffect
(
2
);
coins
+=
20
;
}
}
@@ -84,6 +86,7 @@ public class CollisionCheck {
*/
private
void
pickUpMask
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
if
(
pickUpGeneric
(
x1
,
y1
,
x2
,
y2
,
12
))
{
gp
.
playSoundEffect
(
4
);
gp
.
playerState
=
PlayerState
.
INVISIBLE
;
}
}
@@ -91,6 +94,7 @@ public class CollisionCheck {
int
scooterCost
=
15
;
if
(
coins
>=
scooterCost
)
{
if
(
pickUpGeneric
(
x1
,
y1
,
x2
,
y2
,
14
))
{
gp
.
playSoundEffect
(
4
);
gp
.
playerState
=
PlayerState
.
FASTER
;
coins
-=
scooterCost
;
}
@@ -107,6 +111,7 @@ public class CollisionCheck {
*/
private
void
pickUpShoes
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
if
(
pickUpGeneric
(
x1
,
y1
,
x2
,
y2
,
11
))
{
gp
.
playSoundEffect
(
4
);
gp
.
playerState
=
PlayerState
.
FASTER
;
System
.
out
.
println
(
"Now the player has picked up shoes and should become faster"
);
}
Loading