-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExperimental_Features.lua
More file actions
56 lines (49 loc) · 1.29 KB
/
Experimental_Features.lua
File metadata and controls
56 lines (49 loc) · 1.29 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
--- THIS IS A WORK IN PROGRESS
--- IF IT IS NOT MORE COMPACT FOR A REASONABLE NUMBER OF OBJECTS
--- I WILL PUT IT ON THE BACK BURNER
---@section AddObjectToPrefabs
function AddObjectToPrefabs(object, name)
if not Prefabs[name] then
Prefabs[name] = object
end
end
---@endsection
---@section AddClassToIndex
function AddClassToIndex(class, shorthand)
if not Classes[shorthand] then
Classes[shorthand] = class
end
end
---@endsection
---@section CreateObjectFromProperty
function CreateObjectFromProperty(propertyName)
-- 128 character limit per text property
--[[
The structure should be as the constructor is done, in the same order.
Syntax:
n: Number
s: String
b: Boolean
o: True
x: False
v: Vector
t: Table
c: Class
BS = BaseShape
PG = Polygon
CI = Circle
BO = BaseObject
PO = PhysicsObject
f: Shape (Prefab)
l: Layer
]]
--Example: c:PO;v:144,80;n:0;n:1;s:"Player";n:12;l:"Asteroids"s:"PlayerShape";
end
---@endsection
---@section CreateObjectsFromTable
function CreateObjectsFromTable(table)
for _, objString in ipairs(table) do
CreateObjectFromProperty(objString)
end
end
---@endsection