Changed locations, added Localization folder
Nothing except Title. Minor push, no update.
This commit is contained in:
parent
e9da50897f
commit
520dddedf6
5 changed files with 77 additions and 77 deletions
20
Scripts/NPC.lua
Normal file
20
Scripts/NPC.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
function wander(object, dt)
|
||||
if object.x > object.attributes.wanderpoint + 2 or object.x < object.attributes.wanderpoint - 2 then
|
||||
object.bools.isWalking = true
|
||||
if object.x < object.attributes.wanderpoint then
|
||||
object.physics.velocityX = 1
|
||||
else
|
||||
object.physics.velocityX = -1
|
||||
end
|
||||
else
|
||||
object.attributes.wanderpoint = math.random(0, window.x)
|
||||
end
|
||||
end
|
||||
|
||||
function sayHello(object, dt)
|
||||
object.attributes.time_spoken = object.attributes.time_spoken + dt
|
||||
if object.attributes.time_spoken > 2 then
|
||||
object.bools.isInteracting = false
|
||||
object.attributes.time_spoken = 0
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue