organizing folders

This commit is contained in:
2018-07-01 15:36:20 -04:00
parent c4153b3981
commit 99d46cc6a3
6 changed files with 166 additions and 3 deletions

28
HomeMadeLibs/balls.lua Normal file
View File

@@ -0,0 +1,28 @@
balls = {
xcors = {},
ycors = {},
dia = {},
segs = {},
spesh = {},
mov = {},
spd = {},
tresh = {},
tmptresh = {},
update = function(self, val, len)
for i,v in ipairs(self.dia) do
if (val > self.tresh[i])then
self.tresh[i] = self.tresh[i] +self.tmptresh[i]
self.dia[i] = math.sin((val/self.spesh[i]) * math.pi) * len
if self.mov[i] >= .5 then
self.xcors[i] = self.xcors[i] + math.random(-1 * self.spd[i], self.spd[i])
self.ycors[i] = self.ycors[i] + math.random(-1 * self.spd[i], self.spd[i])
if self.xcors[i] > wwidth then self.xcors[i] = wwidth end
if self.ycors[i] > wheight then self.ycors[i] = wheight end
if self.xcors[i] < 0 then self.xcors[i] = 0 end
if self.ycors[i] < 0 then self.ycors[i] = 0 end
end
end
end
end
}