flip tiles according to h-flip
This commit is contained in:
parent
bbbe7bfe8a
commit
a457893d14
4 changed files with 11 additions and 32 deletions
|
|
@ -81,21 +81,7 @@
|
|||
extract-pos (fn [tag] {:x (round-num-str (get-in tag [:attrs :x]))
|
||||
:y (round-num-str (get-in tag [:attrs :y]))})]
|
||||
{:player-1 (extract-pos player-1)
|
||||
:player-2 (extract-pos player-2)})
|
||||
|
||||
;; {:tag :objectgroup,
|
||||
;; :attrs {:id "2", :name "spawns"},
|
||||
;; {:player-1 nil
|
||||
;; :player-2 nil}
|
||||
;; (vec (reduce (fn [acc tag]
|
||||
;; (if (= (:tag tag) :object)
|
||||
;; (conj acc
|
||||
;; (hash-map
|
||||
;; :name (get-in tag [:attrs :name])
|
||||
;; :x (Math/round (Double/parseDouble (get-in tag [:attrs :x])))
|
||||
;; :y (Math/round (Double/parseDouble (get-in tag [:attrs :y])))))
|
||||
;; acc)) '() (:content (first (filter #(= (get-in % [:attrs :name]) "spawns") tags))))))))
|
||||
}))
|
||||
:player-2 (extract-pos player-2)})}))
|
||||
(def levels {:levels {:level-001 (parse-map level-001-map-tmx)
|
||||
:tutorial (parse-map tutorial-map-tmx)}
|
||||
:colliders colliders})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue