-
Notifications
You must be signed in to change notification settings - Fork 1
/
LOSGame.txt
43 lines (40 loc) · 953 Bytes
/
LOSGame.txt
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
--@name Lanteans OS AppCard (GameSample)
--@author Yuri6037
--@class processor
--@model models/props_junk/sawblade001a.mdl
--Initialisation
Entity = ents.self()
Entity:setMaterial("phoenix_storms/black_chrome")
wire.createOutputs({"AppName", "AppCode"}, {"String", "String"})
Ports = wire.ports
--End
--Application
AppName = "gamesample"
AppCode = [[
local app = {}
function app:Init()
self:SetFullScreen(true)
OS.EnableGL()
self:SetSize(256, 166)
self:SetTitle("Game Sample App")
OS.PlaySound("Musique_Teamfrench/Dada_Life.mp3", true)
end
function app:OnExit()
OS.DisableGL()
OS.StopSound()
end
function app:Render()
gl.glBindColor(math.random(255), math.random(255), math.random(255))
gl.glRect(0, 0, ScrW, ScrH)
end
function app:Touched(x, y)
self:Exit()
end
OS.DefineApp("gamesample", app)
OS.AddAppMenuItem("gamesample", "GameSampleApp", "Sample")
]]
--End
--Saving
Ports["AppName"] = "app_" .. AppName
Ports["AppCode"] = AppCode
--End