level_state: try to avoid hitting powerups, try #2
This commit is contained in:
parent
7ff61ac171
commit
d65357a578
1 changed files with 11 additions and 1 deletions
|
@ -206,7 +206,17 @@ function end_contact(a, b, coll)
|
||||||
end
|
end
|
||||||
|
|
||||||
function pre_solve(a, b, coll)
|
function pre_solve(a, b, coll)
|
||||||
|
if aObj ~= nil and bObj ~= nil then
|
||||||
|
if aObj:isinstance(Plane) and bObj:isinstance(PowerUp) then
|
||||||
|
bObj.deleteLater = true
|
||||||
|
aObj:setPowerUpMode(bObj.mode)
|
||||||
|
coll:setEnabled(false)
|
||||||
|
elseif bObj:isinstance(Plane) and aObj:isinstance(PowerUp) then
|
||||||
|
aObj.deleteLater = true
|
||||||
|
bObj:setPowerUpMode(bObj.mode)
|
||||||
|
coll:setEnabled(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function end_solve(a, b, coll)
|
function end_solve(a, b, coll)
|
||||||
|
|
Loading…
Reference in a new issue