File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -275,9 +275,9 @@ function initialize_scripts_and_components()
275
275
end
276
276
build_sprite_layers ()
277
277
end
278
-
279
- MAIN. scene. rigidbodies = []
280
- MAIN. scene. colliders = []
278
+
279
+ MAIN. scene. rigidbodies = []
280
+ MAIN. scene. colliders = []
281
281
for entity in MAIN. scene. entities
282
282
@debug " adding rigidbodies to global list"
283
283
if entity. rigidbody != C_NULL
Original file line number Diff line number Diff line change 21
21
parent:: Any
22
22
useGravity:: Bool
23
23
velocity:: Math.Vector2f
24
- elapsedTime
25
24
26
25
function InternalRigidbody (parent:: Any ; mass:: Float64 = 1.0 , useGravity:: Bool = true )
27
26
this = new ()
34
33
this. parent = parent
35
34
this. useGravity = useGravity
36
35
this. velocity = Math. Vector2f (0.0 , 0.0 )
37
- this . elapsedTime = 0.0
36
+
38
37
return this
39
38
end
40
39
end
41
40
42
41
function Component. update (this:: InternalRigidbody , dt)
43
42
dt = clamp (dt, 0 , .5 )
44
- this. elapsedTime += dt
45
-
46
43
velocityMultiplier = Math. Vector2f (1.0 , 1.0 )
47
44
transform = this. parent. transform
48
45
currentPosition = transform. position
You can’t perform that action at this time.
0 commit comments