[game] Actual walk cycle
This commit is contained in:
parent
951a2ce635
commit
29b1a854c5
3 changed files with 3 additions and 3 deletions
Binary file not shown.
BIN
game/bot.png
BIN
game/bot.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
|
@ -45,7 +45,7 @@ export function update() {
|
||||||
a.x += 1;
|
a.x += 1;
|
||||||
}
|
}
|
||||||
vnorm(a);
|
vnorm(a);
|
||||||
a = vmul(a, 0.4); // Speed.
|
a = vmul(a, 0.8); // Speed.
|
||||||
|
|
||||||
// Friction
|
// Friction
|
||||||
let v = vmul(robo_vel, friction);
|
let v = vmul(robo_vel, friction);
|
||||||
|
|
@ -73,8 +73,8 @@ const robo_info = {
|
||||||
width: 32,
|
width: 32,
|
||||||
height: 32,
|
height: 32,
|
||||||
animations: [
|
animations: [
|
||||||
{ start: 0, length: 2, speed: 20 },
|
{ start: 0, length: 1, speed: 20 },
|
||||||
{ start: 2, length: 8, speed: 8 },
|
{ start: 1, length: 4, speed: 8 },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue