TombEngine/Scripts/Gameflow.lua

97 lines
1.8 KiB
Lua
Raw Normal View History

2021-12-01 15:31:39 +03:00
-- Place in this LUA script all the levels of your game
-- Title is mandatory and must be the first level
local Flow = TEN.Flow
local Level = Flow.Level
local Color = TEN.Color
local Rotation = TEN.Rotation
local InventoryItem = Flow.InventoryItem
local InvID = Flow.InvID
local RotationAxis = Flow.RotationAxis
local ItemAction = Flow.ItemAction
Flow.SetIntroImagePath("Screens\\Main.png")
2022-08-04 05:23:56 +03:00
Flow.SetTitleScreenImagePath("Screens\\Title.jpg")
2022-08-04 20:06:28 +03:00
Flow.SetFarView(20)
2022-08-04 05:23:56 +03:00
-- Title level
2021-12-01 15:31:39 +03:00
2022-08-04 05:23:56 +03:00
title = Level.new()
2021-12-01 15:31:39 +03:00
2022-08-04 20:06:28 +03:00
title.ambientTrack = "108"
2022-08-04 05:23:56 +03:00
title.levelFile = "Data\\title.ten"
title.scriptFile = "Scripts\\title.lua"
title.loadScreenFile = "Screens\\Main.png"
2021-12-01 15:31:39 +03:00
2022-08-04 05:23:56 +03:00
Flow.AddLevel(title)
2021-12-01 15:31:39 +03:00
2022-08-04 05:23:56 +03:00
-- First test level
test = Level.new()
2021-12-01 15:31:39 +03:00
2022-08-04 20:06:28 +03:00
test.nameKey = "level_test"
test.scriptFile = "Scripts\\TestLevel.lua"
test.ambientTrack = "108"
test.levelFile = "Data\\TestLevel.ten"
2022-08-04 05:23:56 +03:00
test.loadScreenFile = "Screens\\rome.jpg"
test.weather = 0
test.weatherStrength = 1
2021-12-01 15:31:39 +03:00
test.horizon = true
2022-08-04 20:06:28 +03:00
test.farView = 20
test.layer1 = Flow.SkyLayer.new(Color.new(255, 0, 0), 15)
2022-08-04 20:06:28 +03:00
test.fog = Flow.Fog.new(Color.new(0, 0, 0), 12, 20)
2021-12-01 15:31:39 +03:00
test.objects = {
InventoryItem.new(
2021-12-01 15:31:39 +03:00
"tut1_ba_cartouche1",
InvID.PUZZLE_ITEM3_COMBO1,
2021-12-01 15:31:39 +03:00
0,
0.5,
Rotation.new(0, 0, 0),
RotationAxis.Y,
-1,
ItemAction.USE
),
myObj,
InventoryItem.new(
2021-12-01 15:31:39 +03:00
"tut1_ba_cartouche2",
InvID.PUZZLE_ITEM3_COMBO2,
2021-12-01 15:31:39 +03:00
0,
0.5,
Rotation.new(0, 0, 0),
RotationAxis.Y,
-1,
ItemAction.USE
),
InventoryItem.new(
2021-12-01 15:31:39 +03:00
"tut1_ba_cartouche",
InvID.PUZZLE_ITEM3,
2021-12-01 15:31:39 +03:00
0,
0.5,
Rotation.new(0, 0, 0),
RotationAxis.Y,
-1,
ItemAction.USE
),
InventoryItem.new(
2021-12-01 15:31:39 +03:00
"tut1_hand_orion",
InvID.PUZZLE_ITEM6,
2021-12-01 15:31:39 +03:00
0,
0.5,
Rotation.new(270, 180, 0),
RotationAxis.Y,
-1,
ItemAction.USE
),
InventoryItem.new(
2021-12-01 15:31:39 +03:00
"tut1_hand_sirius",
InvID.PUZZLE_ITEM8,
2021-12-01 15:31:39 +03:00
0,
0.5,
Rotation.new(270, 180, 0),
RotationAxis.X,
-1,
ItemAction.USE
)
2022-08-04 05:23:56 +03:00
}
2021-12-01 15:31:39 +03:00
2022-08-04 05:23:56 +03:00
Flow.AddLevel(test)