61 lines
1.3 KiB
Lua
61 lines
1.3 KiB
Lua
List = {}
|
|
|
|
-- Gameplay lists
|
|
List.Simulate = {}
|
|
List.Enemy = {}
|
|
List.EnemyBullet = {}
|
|
List.FriendlyBullet = {}
|
|
|
|
-- Animations
|
|
List.AnimationContainers = {}
|
|
|
|
-- UI Elements
|
|
List.UIElement = {}
|
|
|
|
|
|
--[[
|
|
function AddToList(self, target) -- object where to store id, string name.
|
|
table.insert(List[target],self)
|
|
self.id[target] = #list
|
|
end
|
|
|
|
function RemoveFromList(self, list)
|
|
end
|
|
|
|
for _, value in pairs(self.id) do
|
|
RemoveFromList(self,value)
|
|
|
|
|
|
--[[function Entity:RemoveList(list)
|
|
if list == List.Simulate then
|
|
for _, e in pairs(list) do
|
|
if e.id.Simulate > self.id.Simulate then
|
|
e.id.Simulate = e.id.Simulate - 1
|
|
end
|
|
end
|
|
table.remove(list,self.id.Simulate)
|
|
elseif list == List.Enemy then
|
|
for _, e in pairs(list) do
|
|
if e.id.Enemy > self.id.Enemy then
|
|
e.id.Enemy = e.id.Enemy - 1
|
|
end
|
|
end
|
|
table.remove(list,self.id.Enemy)
|
|
elseif list == List.EnemyBullet then
|
|
for _, e in pairs(list) do
|
|
if e.id.EnemyBullet > self.id.EnemyBullet then
|
|
e.id.EnemyBullet = e.id.EnemyBullet - 1
|
|
end
|
|
end
|
|
table.remove(list,self.id.EnemyBullet)
|
|
elseif list == List.FriendlyBullet then
|
|
for _, e in pairs(list) do
|
|
if e.id.FriendlyBullet > self.id.FriendlyBullet then
|
|
e.id.FriendlyBullet = e.id.FriendlyBullet - 1
|
|
end
|
|
end
|
|
table.remove(list,self.id.FriendlyBullet)
|
|
end
|
|
end
|
|
]]
|