this makes the game feel good.
This commit is contained in:
@@ -488,6 +488,19 @@
|
||||
(if (:update-fn entity)
|
||||
[id ((:update-fn entity) screen entities entity)]
|
||||
[id entity])))))
|
||||
|
||||
entities (if (and (nil? (get-in entities [:tweens :cam-x]))
|
||||
(= 1 (rand-int 40)))
|
||||
(actions/pan-to screen entities
|
||||
(+ (get-in entities [:room :entities :ego :x])
|
||||
(- (rand-int 20) 10))
|
||||
(+ (get-in entities [:room :entities :ego :y])
|
||||
(- (rand-int 20) 10))
|
||||
|
||||
(constantly (get-in entities [:room :entities :ego :scale-x]))
|
||||
tween/ease-in-out-quadratic
|
||||
5.0)
|
||||
entities)
|
||||
|
||||
layers (get-layers entities)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user