add finding player tile by name
This commit is contained in:
4
game.sex
4
game.sex
@@ -53,7 +53,9 @@
|
||||
(var player-width float (tmx-object-width map "FIH" 0))
|
||||
(var player-height float (tmx-object-height map "FIH" 0))
|
||||
|
||||
(= (. state fih) NULL)
|
||||
(var player (* TmxObject)
|
||||
(tmx-find-object-by-name (. state map handle) "FIH" "Player"))
|
||||
(= (. state fih) player)
|
||||
|
||||
(TraceLog LOG-INFO
|
||||
"FIH[0]: \"%s\" type \"%s\" at %.1f, %.1f (%.1f x %.1f)"
|
||||
|
||||
Reference in New Issue
Block a user