USE OFFSET
This commit is contained in:
@@ -23,6 +23,7 @@ const sprites = {
|
||||
yStart: 0,
|
||||
width: 16,
|
||||
height: 16,
|
||||
offset: createVector(-8, -8),
|
||||
},
|
||||
walk: {
|
||||
src: srcs.walk,
|
||||
@@ -30,6 +31,7 @@ const sprites = {
|
||||
yStart: 0,
|
||||
width: 16,
|
||||
height: 16,
|
||||
offset: createVector(-8, -8),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -38,6 +40,8 @@ const animations = {
|
||||
walk: createSpriteAnimation(250, 2),
|
||||
};
|
||||
|
||||
const position = createVector();
|
||||
|
||||
const process = defineEntity<{
|
||||
position: Vector;
|
||||
animation: SpriteAnimation;
|
||||
@@ -52,7 +56,7 @@ const process = defineEntity<{
|
||||
};
|
||||
stuff: number;
|
||||
}>("testEntity", {
|
||||
position: createVector(),
|
||||
position,
|
||||
animation: animations.idle,
|
||||
animations: animations,
|
||||
sprite: sprites.idle,
|
||||
|
||||
Reference in New Issue
Block a user