(once) and (oncePerInstance)
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
(defprop &mut firstDraw true)
|
||||
|
||||
(defmethod new [] 0)
|
||||
|
||||
(defmethod :Void initialize [:Assets assets]
|
||||
(assets.loadSurface "laptop" AssetPaths.laptop__srf))
|
||||
(defmethod :Void update [:Game game :Float deltaSeconds] 0)
|
||||
(defmethod :Void draw [:Void->Graphics graphics :Assets assets]
|
||||
(when firstDraw
|
||||
(set firstDraw false)
|
||||
(oncePerInstance
|
||||
(.blitSurface (graphics) (assets.getSurface "laptop") 0 0)))
|
Reference in New Issue
Block a user