Sped up animations

This commit is contained in:
theo@manjaro 2022-03-10 09:39:17 +01:00
parent 802ec50485
commit ae51411fb0
3 changed files with 6 additions and 6 deletions

View File

@ -18,12 +18,12 @@ function gen:new(game,x,y,color,grid)
Circle.highlightTimer = game:Timer(0.08)
function Circle:step(dt)
self.drawx = self.drawx + (self.rect.x-self.drawx)*dt*5
self.drawy = self.drawy + (self.rect.y-self.drawy)*dt*5
self.drawx = self.drawx + (self.rect.x-self.drawx)*dt*6
self.drawy = self.drawy + (self.rect.y-self.drawy)*dt*6
local i = 1
for i=1,#self.moves do
self.shadowpos[i][1]= self.shadowpos[i][1] + (self.moves[i][1]-self.shadowpos[i][1])*dt*5
self.shadowpos[i][2]= self.shadowpos[i][2] + (self.moves[i][2]-self.shadowpos[i][2])*dt*5
self.shadowpos[i][1]= self.shadowpos[i][1] + (self.moves[i][1]-self.shadowpos[i][1])*dt*6
self.shadowpos[i][2]= self.shadowpos[i][2] + (self.moves[i][2]-self.shadowpos[i][2])*dt*6
end
if self.highlight then

View File

@ -15,7 +15,7 @@ function gen:new(game,winner)
end
function End:MouseCallback(x,y)
local t = self.game.objects.transition:new(game,0.7,"main")
local t = self.game.objects.transition:new(game,0.5,"main")
self.game:summon(t)
end

View File

@ -82,7 +82,7 @@ function gridgen:new(game,x,y,cellsize)
function Grid:endgame(winner)
local args = {}
args.winner = winner
local t = self.game.objects.transition:new(game,0.7,"ending",args)
local t = self.game.objects.transition:new(game,0.5,"ending",args)
self.game:summon(t)
end