lol
This commit is contained in:
@@ -13,8 +13,12 @@ end
|
||||
function onInteract(self)
|
||||
selected = not selected
|
||||
if selected then
|
||||
Controls.SetEnabled(false)
|
||||
Interact.SetEnabled(self, false)
|
||||
setStatus("Object selected! D-pad to move, Triangle to deselect.")
|
||||
else
|
||||
Controls.SetEnabled(true)
|
||||
Interact.SetEnabled(self, true)
|
||||
setStatus("Object deselected.")
|
||||
end
|
||||
end
|
||||
@@ -23,7 +27,8 @@ function onButtonPress(self, button)
|
||||
if not selected then return end
|
||||
|
||||
local pos = self.position
|
||||
local step = 1
|
||||
local one = FixedPoint.new(1)
|
||||
local step = one / 64
|
||||
|
||||
if button == Input.UP then
|
||||
Entity.SetPosition(self, Vec3.new(pos.x, pos.y, pos.z + step))
|
||||
@@ -39,6 +44,8 @@ function onButtonPress(self, button)
|
||||
Entity.SetPosition(self, Vec3.new(pos.x, pos.y - step, pos.z))
|
||||
elseif button == Input.TRIANGLE then
|
||||
selected = false
|
||||
Controls.SetEnabled(true)
|
||||
Interact.SetEnabled(self, true)
|
||||
setStatus("Object deselected.")
|
||||
elseif button == Input.SQUARE then
|
||||
local rot = Entity.GetRotationY(self)
|
||||
|
||||
Reference in New Issue
Block a user