Added first assets

This commit is contained in:
J3oss
2021-06-25 22:09:01 +02:00
commit fdf34f99c6
21 changed files with 2710 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
this.on_init = function()
this.speed = 0.1
this.original_position = this.position
this.cursor_locked = false
end
this.on_fixedupdate = function()
if Input.getKeyJustPressed(Input.KeyCode.Enter) then
gotoScene('MainScene')
end
if Input.getKeyDown(Input.KeyCode.L) then
if this.cursor_locked then
Input.unlockCursor()
else
Input.lockCursor()
end
this.cursor_locked = not this.cursor_locked
end
if Input.getKeyDown(Input.KeyCode.Up) then
this.position = this.position - Vec3:new(0, 0, 1) * this.speed
end
if Input.getKeyDown(Input.KeyCode.Down) then
this.position = this.position + Vec3:new(0, 0, 1) * this.speed
end
if Input.getKeyDown(Input.KeyCode.Right) then
this.position = this.position + Vec3:new(1, 0, 0) * this.speed
end
if Input.getKeyDown(Input.KeyCode.Left) then
this.position = this.position - Vec3:new(1, 0, 0) * this.speed
end
end