mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 04:13:58 -04:00
Remove test files
This commit is contained in:
parent
df6c6ed73e
commit
58d9e44bb1
3 changed files with 0 additions and 72 deletions
10
conf.lua
10
conf.lua
|
@ -1,10 +0,0 @@
|
|||
function love.conf(t)
|
||||
t.identity = "Concord Example"
|
||||
t.version = "11.0"
|
||||
t.console = true
|
||||
|
||||
t.window.vsync = false
|
||||
t.window.width = 720
|
||||
t.window.height = 720
|
||||
end
|
||||
|
56
main.lua
56
main.lua
|
@ -1,56 +0,0 @@
|
|||
--[=[
|
||||
local file = "examples.simpleDrawing"
|
||||
-- local file = "examples.baseLayout.main"
|
||||
|
||||
require(file)
|
||||
]=]--
|
||||
|
||||
--test
|
||||
|
||||
local Concord = require("src")
|
||||
|
||||
local Component = Concord.component
|
||||
local System = Concord.system
|
||||
local Entity = Concord.entity
|
||||
local World = Concord.world
|
||||
|
||||
local test_comp_1 = Component(function(e, a)
|
||||
e.a = a
|
||||
end)
|
||||
|
||||
local test_system_1 = System({test_comp_1})
|
||||
local test_system_2 = System({test_comp_1})
|
||||
local test_system_3 = System({test_comp_1})
|
||||
|
||||
function test_system_1:test()
|
||||
for _, _ in ipairs(self.pool) do
|
||||
end
|
||||
end
|
||||
|
||||
function test_system_2:test()
|
||||
for _, _ in ipairs(self.pool) do
|
||||
end
|
||||
end
|
||||
|
||||
function test_system_3:test()
|
||||
for _, _ in ipairs(self.pool) do
|
||||
end
|
||||
end
|
||||
|
||||
local world = World()
|
||||
|
||||
world:addSystems(test_system_1, test_system_2, test_system_3)
|
||||
|
||||
for _ = 1, 100 do
|
||||
local entity = Entity(world)
|
||||
entity:give(test_comp_1, 100, 100)
|
||||
end
|
||||
|
||||
|
||||
local start = love.timer.getTime()
|
||||
for _ = 1, 1000000 do
|
||||
world:emit("test")
|
||||
end
|
||||
local stop = love.timer.getTime()
|
||||
|
||||
print("Time taken: " .. stop - start)
|
|
@ -1,6 +0,0 @@
|
|||
local Component = require("src").component
|
||||
|
||||
return Component(function(e, x, y)
|
||||
e.x = x
|
||||
e.y = y
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue