Rectangle components in NAT
This commit is contained in:
@@ -27,6 +27,12 @@
|
||||
(otherwise
|
||||
(.onComplete (BitmapData.loadFromFile pinnedImage)
|
||||
->bitmapData (loadGraphic bitmapData))))))
|
||||
((hasComponent e Rectangle)
|
||||
(let [rect (readComponent e Rectangle)
|
||||
w (Std.int rect.width)
|
||||
h (Std.int rect.height)]
|
||||
(makeGraphic w h FlxColor.TRANSPARENT)
|
||||
(FlxSpriteUtil.drawRect this 0 0 w h FlxColor.TRANSPARENT (object color FlxColor.WHITE))))
|
||||
((hasComponent e Circle)
|
||||
(set isCircle true)
|
||||
(let [c (readComponent e Circle)
|
||||
|
@@ -11,7 +11,7 @@
|
||||
(super
|
||||
playState
|
||||
->[archive e]
|
||||
?(or (hasComponent e Name) (hasComponent e Circle))
|
||||
?(or (hasComponent e Name) (hasComponent e Circle) (hasComponent e Rectangle))
|
||||
->[archive e pos &opt ui]
|
||||
(unless (sprites.exists e.id)
|
||||
(let [sprite (new EntrySprite this _playgroundKey pos archive e controller)]
|
||||
|
Reference in New Issue
Block a user