Set a texture entity's width and height when it is first created
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user