             (mark-for-removal entity2 entities)))
         ;:else entities
       )))
+
+  :on-timer
+  (fn [screen entities]
+    (case (:id screen)
+      :refresh-shot (update! screen :fire-when-ready true)
+      nil)
+    nil)
+
+  :on-key-up
+  (fn [screen entities]
+    (cond (= (:key screen) (key-code :x))
+          (update! screen :fire-when-ready true))
+    entities)
   )
 
 


(defn check-for-input [screen entities]
   (cond
     (key-pressed? :x) (let [ship (first (filter #(:ship? %) entities))
                                 x (:x ship)
                                 y (:y ship)]
                           ;(prn :x x :y y)
                         (conj entities (bullet/create-bullet! screen x (+ 0.1 y)))
                             )
     :else entities
     ))


          0 0]
         float-array
         (chain-shape :create-chain)
         (fixture-def :is-sensor true :density 1 :restitution 1 :shape )
         (body! body :create-fixture))
body))

(defn mark-for-removal [entity entities]
  (do
    (remove #(= entity %) entities)
    ))

(-> main-screen :entities deref)

;(do (use 'ds3.core.desktop-launcher)(-main))
