Skip to content

Commit ab040a2

Browse files
committed
Initial commit
0 parents  commit ab040a2

File tree

4 files changed

+88
-0
lines changed

4 files changed

+88
-0
lines changed

License

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Lucas Sardois
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

exemple/main.lua

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
local sceneman = require('../sceneman')
2+
3+
local scenemainmenu = sceneman:new()
4+
local scenegame = sceneman:new()
5+
local scenepause = sceneman:new()
6+
7+
sceneman:start(scenemainmenu)
8+
sceneman:start(scenegame)
9+
-- player press pause button
10+
sceneman:start(scenepause)

sceneman.lua

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
local sceneman = {}
2+
3+
return sceneman

spec/sceneman_spec.lua

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
local sceneman = require('../sceneman')
2+
3+
describe('Scenes', function()
4+
5+
describe('creation', function()
6+
it('should return a scene object', function()
7+
8+
end)
9+
end)
10+
11+
describe('added', function()
12+
it('should increase the total number of scenes', function()
13+
14+
end)
15+
16+
it('should be stopped by default', function()
17+
18+
end)
19+
end)
20+
21+
describe('stopped', function()
22+
it('should not have their update method called', function()
23+
24+
end)
25+
26+
it('should not have their draw method called', function()
27+
28+
end)
29+
end)
30+
31+
describe('started', function()
32+
it('should have their update method called', function()
33+
34+
end)
35+
36+
it('should have their draw method called', function()
37+
38+
end)
39+
end)
40+
41+
end)
42+
43+
describe('Sceneman', function()
44+
45+
describe('start function', function()
46+
it('should call the stop function of the current started scene if any', function()
47+
48+
end)
49+
50+
it('should call the start function of the new scene', function()
51+
52+
end)
53+
end)
54+
end)

0 commit comments

Comments
 (0)