4
0
Fork 0
This commit is contained in:
sOlaris38 2020-12-05 17:07:07 +01:00
parent 1ed3e19775
commit e5f557c82b
3 changed files with 14 additions and 17 deletions

View file

@ -1,13 +1,7 @@
dureeDeplacement = 120;
dureeDeplacement = 0;
deplaceHorizontal = 0;
deplaceVertical = 0;
dir = random(3);
switch(dir) {
case 0 : deplacementVertical = 1; break;
case 1 : deplacementHorizontal = 1; break;
case 2 : deplacementVertical = -1; break;
case 3 : deplacementHorizontal = -1; break;
}
dir = 3;

View file

@ -1 +1,3 @@
draw_text(16,16,dureeDeplacement);
draw_text(16,16,dir);
draw_text(16,48,deplaceVertical);
draw_text(16,80,deplaceHorizontal);

View file

@ -6,14 +6,15 @@ 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;
}
}