deprecate old projects & reduce CI workload

This commit is contained in:
2023-02-18 16:24:20 -07:00
parent c5002c48bc
commit e1f306a92e
147 changed files with 4 additions and 9 deletions

View File

@@ -0,0 +1,27 @@
(var &mut :Spatial pivot null)
(var &mut :Vector3 _velocity Vector3.ZERO)
(method &public &override :Void _Ready []
(set pivot (cast (getNode "Pivot") Spatial)))
(method &public &override :Void _PhysicsProcess [:Single delta]
(let [&mut direction Vector3.ZERO]
(when (Input.isActionPressed "move_right")
(+= direction.x 1))
(when (Input.isActionPressed "move_left")
(-= direction.x 1))
(when (Input.isActionPressed "move_backward")
(+= direction.z 1))
(when (Input.isActionPressed "move_forward")
(-= direction.z 1))
(when !(= direction Vector3.ZERO)
(set direction (direction.normalized))
// TODO for some reason, the Vector3 addition operator is only found when used in a raw haxe expr:
(pivot.lookAt #{translation + direction;}# Vector3.UP))
(set _velocity.x (* direction.x speed))
(set _velocity.z (* direction.z speed))
(-= _velocity.y (* fallAcceleration delta))
(set _velocity (moveAndSlide _velocity Vector3.UP))
))