Skip to content

Commit

Permalink
impl: move_direction
Browse files Browse the repository at this point in the history
  • Loading branch information
gnlow committed Dec 5, 2023
1 parent ff4bd4e commit 7ff12dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7ff12dc

Please sign in to comment.