Set a texture entity's width and height when it is first created

This commit is contained in:
oakes
2014-01-19 15:10:54 -05:00
parent 54f03ec0ed
commit 9eba3bb28a
2 changed files with 8 additions and 8 deletions

View File

@@ -137,8 +137,11 @@
(defmulti create-entity class)
(defmethod create-entity TextureRegion
[obj]
{:type :texture :object obj})
[^TextureRegion obj]
{:type :texture
:object obj
:width (.getRegionWidth obj)
:height (.getRegionHeight obj)})
(defmethod create-entity Actor
[obj]