Skip to content

Commit 82199e6

Browse files
committed
Removed old play_animation
1 parent b8bc3b1 commit 82199e6

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

docs/en/manuals/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function update(self, dt)
4343
-- set animation
4444
local anim = direction_animation(self.dir, "player")
4545
if anim ~= self.current_anim then
46-
msg.post("#sprite", "play_animation", { id = anim })
46+
sprite.play_flipbook("#sprite", anim)
4747
self.current_anim = anim
4848
end
4949
end

docs/ko/manuals/animation.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ function on_input(self, action_id, action)
5151
-- 버튼입력시 "dodge" 동작을 시작함
5252
if action_id == hash("dodge") then
5353
if action.pressed then
54-
msg.post("#sprite", "play_animation", {id = hash("start_dodge")})
54+
sprite.play_flipbook("#sprite", "start_dodge")
5555
-- 회피동작 상태인지 기억하기
5656
self.dodge = true
5757
elseif action.released then
58-
msg.post("#sprite", "play_animation", {id = hash("stop_dodge")})
58+
sprite.play_flipbook("#sprite", "stop_dodge")
5959
-- 회피동작을 끝냄
6060
self.dodge = false
6161
end
@@ -66,9 +66,9 @@ function on_message(self, message_id, message, sender)
6666
if message_id == hash("animation_done") then
6767
-- 애니메이션의 트랜지션이 끝나고 반복 애니메이션을 시작함
6868
if self.dodge then
69-
msg.post("#sprite", "play_animation", {id = hash("dodge_idle")})
69+
sprite.play_flipbook("#sprite", "dodge_idle")
7070
else
71-
msg.post("#sprite", "play_animation", {id = hash("idle")})
71+
sprite.play_flipbook("#sprite", "idle")
7272
end
7373
end
7474
end

docs/pl/manuals/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function update(self, dt)
4343
-- ustaw animację
4444
local anim = direction_animation(self.dir, "player")
4545
if anim ~= self.current_anim then
46-
msg.post("#sprite", "play_animation", { id = anim })
46+
sprite.play_flipbook("#sprite", anim)
4747
self.current_anim = anim
4848
end
4949
end

docs/ru/manuals/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function update(self, dt)
4343
-- установить анимацию
4444
local anim = direction_animation(self.dir, "player")
4545
if anim ~= self.current_anim then
46-
msg.post("#sprite", "play_animation", { id = anim })
46+
sprite.play_flipbook("#sprite", anim)
4747
self.current_anim = anim
4848
end
4949
end

docs/zh/manuals/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function update(self, dt)
4343
-- 设置方向动画
4444
local anim = direction_animation(self.dir, "player")
4545
if anim ~= self.current_anim then
46-
msg.post("#sprite", "play_animation", { id = anim })
46+
sprite.play_flipbook("#sprite", anim)
4747
self.current_anim = anim
4848
end
4949
end

0 commit comments

Comments
 (0)