Added evmod_assets and started using it for scripts

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2021-05-31 23:00:38 +02:00
parent 995312a8b6
commit fb5128df7b
10 changed files with 141 additions and 133 deletions

View File

@@ -0,0 +1,15 @@
this.on_init = function ()
this.custom_eulerangles = Vec3:new()
this.custom_angularvelocity = Vec3:new(0, 0.01, 0)
end
this.on_fixedupdate = function ()
print('Scene0 OnFixedUpdate Entity #' .. this.entityID)
if Input.getKeyDown(Input.KeyCode.Left) then
this.custom_eulerangles:add(Vec3:new(0,0.01,0))
end
if Input.getKeyDown(Input.KeyCode.Right) then
this.custom_eulerangles:sub(Vec3:new(0,0.01,0))
end
this.eulerAngles = this.custom_eulerangles
end