forked from alperklc/am-i-who-i-am
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sceneOne.lua
84 lines (73 loc) · 1.58 KB
/
sceneOne.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
function updateSceneOne(st, dt)
introSnd:play()
if st == 0 then
aydinlat(dt)
if sceneAydinlat then
sceneOneState = 1
end
elseif st == 1 then
if love.keyboard.isDown("space") then
sceneOneState = 2
end
elseif st == 2 then
karart(dt)
if sceneKarart then
sceneOneState = 3
resetFade()
end
elseif st == 3 then
aydinlat(dt)
if sceneAydinlat then
sceneOneState = 4
end
elseif st == 4 then
if love.keyboard.isDown("space") then
sceneOneState = 5
end
elseif st == 5 then
karart(dt)
if sceneKarart then
sceneOneState = 6
resetFade()
end
elseif st == 6 then
karart(dt)
resetFade()
introSnd:pause()
sceneNo = 2
end
end
function drawSceneOne(st)
if st == 0 then
love.graphics.setColor(255, 255, 255, aScene)
love.graphics.draw(scn_1, 0, 0)
elseif st == 1 then
love.graphics.draw(scn_1, 0, 0)
elseif st == 2 then
love.graphics.setColor(255, 255, 255, aScene)
love.graphics.draw(scn_1, 0, 0)
elseif st == 3 then
love.graphics.setColor(255, 255, 255, aScene)
love.graphics.draw(scn_2, 0, 0)
elseif st == 4 then
love.graphics.draw(scn_2, 0, 0)
elseif st == 5 then
love.graphics.setColor(255, 255, 255, aScene)
love.graphics.draw(scn_2, 0, 0)
elseif st == 6 then
end
end
function aydinlat(dt)
aScene = aScene + dt * 100
if aScene > 254 then
aScene = 255
sceneAydinlat = true
end
end
function karart(dt)
aScene = aScene - dt * 100
if aScene < 1 then
aScene = 0
sceneKarart = true
end
end