Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LEGER ROMAIN
CasseBrique
Commits
efb9edad
Commit
efb9edad
authored
Dec 18, 2015
by
Rominho15
Browse files
Version 4 :
- Gestion des méthodes "Curseur" et "Rotation" - Gestion du niveau 1 et 2, + transition
parent
9ab12018
Pipeline
#1011
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/example/rleger/cassebrique/Controller/GameController.java
View file @
efb9edad
...
...
@@ -148,8 +148,9 @@ public class GameController {
}
public
void
moveBatAccelerometer
(
float
x
)
{
int
newX
=
gameModel
.
getBat
().
getX
()+(
int
)
x
;
gameModel
.
getBat
().
setX
(
newX
);
int
addX
=
(
int
)-
x
;
int
oldX
=
gameModel
.
getBat
().
getX
()
+
gameModel
.
getBat
().
getWidth
()/
2
;
gameModel
.
getBat
().
setX
(
oldX
+
addX
);
}
public
int
collides
(
Ball
ba
,
Bat
bt
)
{
...
...
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