diff --git a/src/Entry.ts b/src/Entry.ts index 8ab1301..fa0e7ff 100644 --- a/src/Entry.ts +++ b/src/Entry.ts @@ -190,6 +190,10 @@ export class Entry { } /* 움직임 */ + move_direction(n: number, obj: EntrySprite) { + obj.x += n * Math.sin(toRadian(obj.direction)) + obj.y -= n * Math.cos(toRadian(obj.direction)) + } move_x(n: number, obj: EntrySprite) { obj.x += n }