This commit is contained in:
parent
1ed3e19775
commit
e5f557c82b
3 changed files with 14 additions and 17 deletions
|
@ -1,13 +1,7 @@
|
|||
dureeDeplacement = 120;
|
||||
dureeDeplacement = 0;
|
||||
|
||||
deplaceHorizontal = 0;
|
||||
deplaceVertical = 0;
|
||||
|
||||
dir = random(3);
|
||||
dir = 3;
|
||||
|
||||
switch(dir) {
|
||||
case 0 : deplacementVertical = 1; break;
|
||||
case 1 : deplacementHorizontal = 1; break;
|
||||
case 2 : deplacementVertical = -1; break;
|
||||
case 3 : deplacementHorizontal = -1; break;
|
||||
}
|
|
@ -1 +1,3 @@
|
|||
draw_text(16,16,dureeDeplacement);
|
||||
draw_text(16,16,dir);
|
||||
draw_text(16,48,deplaceVertical);
|
||||
draw_text(16,80,deplaceHorizontal);
|
||||
|
|
|
@ -6,13 +6,14 @@ if dureeDeplacement != 0 {
|
|||
dureeDeplacement --;
|
||||
}
|
||||
else {
|
||||
dir = random(3);
|
||||
|
||||
deplaceHorizontal = 0;
|
||||
deplaceVertical = 0;
|
||||
dir = irandom(3);
|
||||
switch(dir) {
|
||||
case 0 : deplacementVertical = 1; break;
|
||||
case 1 : deplacementHorizontal = 1; break;
|
||||
case 2 : deplacementVertical = -1; break;
|
||||
case 3 : deplacementHorizontal = -1; break;
|
||||
case 0 : deplaceVertical = 1; break;
|
||||
case 1 : deplaceHorizontal = 1; break;
|
||||
case 2 : deplaceVertical = -1; break;
|
||||
case 3 : deplaceHorizontal = -1; break;
|
||||
}
|
||||
|
||||
dureeDeplacement = 120;
|
||||
|
|
Reference in a new issue