mirror of
https://github.com/tacigar/maidroid.git
synced 2025-01-10 00:00:18 +01:00
[FIX] Fix on_punch bug of maidroid
This commit is contained in:
parent
de7ede9d8d
commit
b473843752
@ -361,13 +361,13 @@ function maidroid.register_maidroid(product_name, def)
|
|||||||
self.pause = false
|
self.pause = false
|
||||||
if self.core_name ~= "" then
|
if self.core_name ~= "" then
|
||||||
local core = maidroid.registered_cores[self.core_name]
|
local core = maidroid.registered_cores[self.core_name]
|
||||||
core.on_pause(self)
|
core.on_resume(self)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.pause = true
|
self.pause = true
|
||||||
if self.core_name ~= "" then
|
if self.core_name ~= "" then
|
||||||
local core = maidroid.registered_cores[self.core_name]
|
local core = maidroid.registered_cores[self.core_name]
|
||||||
core.on_resume(self)
|
core.on_pause(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
local state = {IDLE = 0, ACCOMPANY = 1}
|
local state = {IDLE = 0, ACCOMPANY = 1}
|
||||||
|
|
||||||
local function on_start(self)
|
local function on_start(self)
|
||||||
|
print("KOKO")
|
||||||
self.state = state.IDLE
|
self.state = state.IDLE
|
||||||
self.object:setacceleration{x = 0, y = -10, z = 0}
|
self.object:setacceleration{x = 0, y = -10, z = 0}
|
||||||
self.object:setvelocity{x = 0, y = 0, z = 0}
|
self.object:setvelocity{x = 0, y = 0, z = 0}
|
||||||
|
Loading…
Reference in New Issue
Block a user