wait for the neutron's animation before ending the game
This commit is contained in:
parent
748cffed12
commit
8b04842eeb
@ -29,8 +29,8 @@ function gridgen:new(game,x,y,cellsize)
|
|||||||
local i
|
local i
|
||||||
local winner = "None"
|
local winner = "None"
|
||||||
for i=1,#obj do
|
for i=1,#obj do
|
||||||
if obj[i].rect.y==self.rect.y then winner = "pink" end
|
if obj[i].drawy<=self.rect.y+self.cellsize/2 then winner = "pink" end
|
||||||
if obj[i].rect.y+obj[i].rect.h==self.rect.y+self.rect.h then winner = "blue" end
|
if obj[i].drawy+obj[i].rect.h>=self.rect.y+self.rect.h-self.cellsize/2 then winner = "blue" end
|
||||||
end
|
end
|
||||||
if winner~="None" then
|
if winner~="None" then
|
||||||
self:endgame(winner)
|
self:endgame(winner)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user