-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.lua
More file actions
71 lines (40 loc) · 1.26 KB
/
main.lua
File metadata and controls
71 lines (40 loc) · 1.26 KB
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
require("lib.CC_engineadd")
require("lib.Kyo")
require("lib.Kyo_t")
require("lib.Yaoshi")
require "lib.NormalMap"
require "lib.LargeMap"
require "lib.Swordman"
require "lib.Q_control"
function love.load() --资源加载回调函数,仅初始化时调用一次
--如果调试启动,就开启调试模式
if arg[#arg] == "-debug" then require("mobdebug").start() end
if love.filesystem.isFused() then
print("current is in fused model")
end
loveframes = require("lib.loveframes")
Q_control.init()
end
function love.update(dt) --更新回调函数,每周期调用
Physics_Sys_Key() --物理按键系统,在CC_engineadd中
Q_control.update(dt)
loveframes.update(dt)
end
--ScreenShowObj比较函数
--function (ScreenShowObja, ScreenShowObjb) return ScreenShowObja.y < ScreenShowObjb.y end
function love.draw() --绘图回调函数,每周期调用
Q_control.draw()
loveframes.draw()
end
function love.mousepressed(x, y, button)
loveframes.mousepressed(x, y, button)
end
function love.mousereleased(x, y, button)
loveframes.mousereleased(x, y, button)
end
function love.keypressed(key, unicode)
loveframes.keypressed(key, unicode)
end
function love.keyreleased(key)
loveframes.keyreleased(key)
end