added outside particles. Nice effect.
This commit is contained in:
426
desktop/resources/outside-particles
Normal file
426
desktop/resources/outside-particles
Normal file
@@ -0,0 +1,426 @@
|
||||
wind
|
||||
- Delay -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
- Duration -
|
||||
lowMin: 3000.0
|
||||
lowMax: 3000.0
|
||||
- Count -
|
||||
min: 0
|
||||
max: 2
|
||||
- Emission -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 0.7755102
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Life -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 10000.0
|
||||
highMax: 5000.0
|
||||
relative: false
|
||||
scalingCount: 3
|
||||
scaling0: 1.0
|
||||
scaling1: 1.0
|
||||
scaling2: 1.0
|
||||
timelineCount: 3
|
||||
timeline0: 0.0
|
||||
timeline1: 0.66
|
||||
timeline2: 1.0
|
||||
- Life Offset -
|
||||
active: false
|
||||
- X Offset -
|
||||
active: true
|
||||
lowMin: -25.0
|
||||
lowMax: -25.0
|
||||
highMin: 0.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Y Offset -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 0.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Spawn Shape -
|
||||
shape: square
|
||||
- Spawn Width -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 320.0
|
||||
highMax: 320.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Spawn Height -
|
||||
lowMin: -16.0
|
||||
lowMax: -16.0
|
||||
highMin: 240.0
|
||||
highMax: 240.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Scale -
|
||||
lowMin: 1.0
|
||||
lowMax: 1.0
|
||||
highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 3
|
||||
scaling0: 1.0
|
||||
scaling1: 1.0
|
||||
scaling2: 1.0
|
||||
timelineCount: 3
|
||||
timeline0: 0.0
|
||||
timeline1: 0.41095892
|
||||
timeline2: 1.0
|
||||
- Velocity -
|
||||
active: true
|
||||
lowMin: 1.0
|
||||
lowMax: 0.0
|
||||
highMin: 1.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 1.0
|
||||
scaling1: 0.30612245
|
||||
scaling2: 0.877551
|
||||
scaling3: 0.59183675
|
||||
scaling4: 1.0
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.39726028
|
||||
timeline2: 0.60958904
|
||||
timeline3: 0.8150685
|
||||
timeline4: 0.98630136
|
||||
- Angle -
|
||||
active: true
|
||||
lowMin: 90.0
|
||||
lowMax: 90.0
|
||||
highMin: 180.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 3
|
||||
scaling0: 1.0
|
||||
scaling1: 1.0
|
||||
scaling2: 1.0
|
||||
timelineCount: 3
|
||||
timeline0: 0.0
|
||||
timeline1: 0.37671232
|
||||
timeline2: 1.0
|
||||
- Rotation -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 0.0
|
||||
highMax: 0.0
|
||||
relative: true
|
||||
scalingCount: 2
|
||||
scaling0: 0.0
|
||||
scaling1: 1.0
|
||||
timelineCount: 2
|
||||
timeline0: 0.0
|
||||
timeline1: 1.0
|
||||
- Wind -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 10.0
|
||||
highMin: -10.0
|
||||
highMax: 20.0
|
||||
relative: true
|
||||
scalingCount: 4
|
||||
scaling0: 1.0
|
||||
scaling1: 0.67346936
|
||||
scaling2: 0.93877554
|
||||
scaling3: 0.48979592
|
||||
timelineCount: 4
|
||||
timeline0: 0.0
|
||||
timeline1: 0.2739726
|
||||
timeline2: 0.5479452
|
||||
timeline3: 0.93835616
|
||||
- Gravity -
|
||||
active: true
|
||||
lowMin: 25.0
|
||||
lowMax: 25.0
|
||||
highMin: -25.0
|
||||
highMax: -25.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 0.75510204
|
||||
scaling1: 0.26530612
|
||||
scaling2: 0.7346939
|
||||
scaling3: 0.2857143
|
||||
scaling4: 0.81632656
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.3219178
|
||||
timeline2: 0.51369864
|
||||
timeline3: 0.8767123
|
||||
timeline4: 1.0
|
||||
- Tint -
|
||||
colorsCount: 3
|
||||
colors0: 0.972549
|
||||
colors1: 0.972549
|
||||
colors2: 0.972549
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Transparency -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 0.0
|
||||
scaling1: 0.2982456
|
||||
scaling2: 0.22807017
|
||||
scaling3: 0.2982456
|
||||
scaling4: 0.0
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.12328767
|
||||
timeline2: 0.34246576
|
||||
timeline3: 0.6232877
|
||||
timeline4: 1.0
|
||||
- Options -
|
||||
attached: false
|
||||
continuous: true
|
||||
aligned: false
|
||||
additive: false
|
||||
behind: false
|
||||
premultipliedAlpha: false
|
||||
- Image Path -
|
||||
dot.png
|
||||
|
||||
|
||||
wind
|
||||
- Delay -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
- Duration -
|
||||
lowMin: 3000.0
|
||||
lowMax: 3000.0
|
||||
- Count -
|
||||
min: 0
|
||||
max: 3
|
||||
- Emission -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 0.5102041
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Life -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 10000.0
|
||||
highMax: 5000.0
|
||||
relative: false
|
||||
scalingCount: 3
|
||||
scaling0: 1.0
|
||||
scaling1: 1.0
|
||||
scaling2: 1.0
|
||||
timelineCount: 3
|
||||
timeline0: 0.0
|
||||
timeline1: 0.66
|
||||
timeline2: 1.0
|
||||
- Life Offset -
|
||||
active: false
|
||||
- X Offset -
|
||||
active: true
|
||||
lowMin: -25.0
|
||||
lowMax: -25.0
|
||||
highMin: 0.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Y Offset -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 0.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Spawn Shape -
|
||||
shape: square
|
||||
- Spawn Width -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 320.0
|
||||
highMax: 320.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Spawn Height -
|
||||
lowMin: -16.0
|
||||
lowMax: -16.0
|
||||
highMin: 240.0
|
||||
highMax: 240.0
|
||||
relative: false
|
||||
scalingCount: 1
|
||||
scaling0: 1.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Scale -
|
||||
lowMin: 1.0
|
||||
lowMax: 1.0
|
||||
highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 3
|
||||
scaling0: 1.0
|
||||
scaling1: 1.0
|
||||
scaling2: 1.0
|
||||
timelineCount: 3
|
||||
timeline0: 0.0
|
||||
timeline1: 0.41095892
|
||||
timeline2: 1.0
|
||||
- Velocity -
|
||||
active: true
|
||||
lowMin: 1.0
|
||||
lowMax: 0.0
|
||||
highMin: 1.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 1.0
|
||||
scaling1: 0.30612245
|
||||
scaling2: 0.877551
|
||||
scaling3: 0.59183675
|
||||
scaling4: 1.0
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.39726028
|
||||
timeline2: 0.60958904
|
||||
timeline3: 0.8150685
|
||||
timeline4: 0.98630136
|
||||
- Angle -
|
||||
active: true
|
||||
lowMin: 90.0
|
||||
lowMax: 90.0
|
||||
highMin: 180.0
|
||||
highMax: 0.0
|
||||
relative: false
|
||||
scalingCount: 3
|
||||
scaling0: 1.0
|
||||
scaling1: 1.0
|
||||
scaling2: 1.0
|
||||
timelineCount: 3
|
||||
timeline0: 0.0
|
||||
timeline1: 0.37671232
|
||||
timeline2: 1.0
|
||||
- Rotation -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 0.0
|
||||
highMax: 0.0
|
||||
relative: true
|
||||
scalingCount: 2
|
||||
scaling0: 0.0
|
||||
scaling1: 1.0
|
||||
timelineCount: 2
|
||||
timeline0: 0.0
|
||||
timeline1: 1.0
|
||||
- Wind -
|
||||
active: true
|
||||
lowMin: 0.0
|
||||
lowMax: -15.0
|
||||
highMin: 10.0
|
||||
highMax: -20.0
|
||||
relative: true
|
||||
scalingCount: 4
|
||||
scaling0: 1.0
|
||||
scaling1: 0.67346936
|
||||
scaling2: 0.93877554
|
||||
scaling3: 0.48979592
|
||||
timelineCount: 4
|
||||
timeline0: 0.0
|
||||
timeline1: 0.2739726
|
||||
timeline2: 0.5479452
|
||||
timeline3: 0.93835616
|
||||
- Gravity -
|
||||
active: true
|
||||
lowMin: 25.0
|
||||
lowMax: 25.0
|
||||
highMin: -25.0
|
||||
highMax: -25.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 0.75510204
|
||||
scaling1: 0.26530612
|
||||
scaling2: 0.7346939
|
||||
scaling3: 0.2857143
|
||||
scaling4: 0.81632656
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.3219178
|
||||
timeline2: 0.51369864
|
||||
timeline3: 0.8767123
|
||||
timeline4: 1.0
|
||||
- Tint -
|
||||
colorsCount: 3
|
||||
colors0: 0.972549
|
||||
colors1: 0.972549
|
||||
colors2: 0.972549
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Transparency -
|
||||
lowMin: 0.0
|
||||
lowMax: 0.0
|
||||
highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 0.0
|
||||
scaling1: 0.2982456
|
||||
scaling2: 0.22807017
|
||||
scaling3: 0.2982456
|
||||
scaling4: 0.0
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.12328767
|
||||
timeline2: 0.34246576
|
||||
timeline3: 0.6232877
|
||||
timeline4: 1.0
|
||||
- Options -
|
||||
attached: false
|
||||
continuous: true
|
||||
aligned: false
|
||||
additive: false
|
||||
behind: false
|
||||
premultipliedAlpha: false
|
||||
- Image Path -
|
||||
dot.png
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns advent.screens.rooms.behind-house
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.screens.items :as items]
|
||||
[advent.actions :as actions]
|
||||
[advent.utils :as utils]
|
||||
@@ -85,10 +86,12 @@
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/update-entity entities :peeling #(assoc % :opacity 0))
|
||||
(actions/update-state entities (fn [state] (assoc state :opened-crack? true)))))))
|
||||
:bird (utils/make-bird screen [[50 235] [80 220] [100 239] [180 235] [85 225]])}
|
||||
:bird (utils/make-bird screen [[50 235] [80 220] [100 239] [180 235] [85 225]])
|
||||
:outside-particles (common/make-outside-particles)}
|
||||
:collision "behindhouse/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :opened-crack?])
|
||||
(assoc-in entities [:room :entities :peeling :opacity] 0)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.actions :as actions]
|
||||
[advent.screens.items :as items]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.utils :as utils]
|
||||
[clojure.zip :as zip]
|
||||
[play-clj.core :refer :all]
|
||||
@@ -161,6 +162,7 @@
|
||||
:entities {:frankie (make-frankie screen)
|
||||
:goon-1 (make-goon-1 screen)
|
||||
:goon-2 (make-goon-2 screen)
|
||||
:outside-particles (common/make-outside-particles)
|
||||
}
|
||||
:walkie-talkies (rooms/make-entity :walkie-talkies
|
||||
(assoc (animation->texture screen walkie-visible)
|
||||
@@ -176,6 +178,7 @@
|
||||
:collision "castle-gate/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.30)
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(as-> entities entities
|
||||
(if (= :night (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.actions :as actions]
|
||||
[advent.screens.items :as items]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.utils :as utils]
|
||||
[clojure.zip :as zip]
|
||||
[play-clj.core :refer :all]
|
||||
@@ -275,7 +276,9 @@
|
||||
(assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
|
||||
(assoc (texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
|
||||
(assoc (texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
|
||||
:entities {:cat (actions/start-animation screen
|
||||
:entities {
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:cat (actions/start-animation screen
|
||||
(assoc (animation->texture screen cat-stand)
|
||||
:x 184 :y 173 :baseline 1000
|
||||
:walk cat-walk
|
||||
@@ -351,6 +354,7 @@
|
||||
:collision "cat-tree/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities :kiss)
|
||||
(update-in entities [:room :entities] #(dissoc % :cat))
|
||||
|
||||
@@ -182,3 +182,9 @@
|
||||
(actions/play-animation entities :ego :standup)
|
||||
(Thread/sleep 15000)
|
||||
))
|
||||
|
||||
|
||||
(defn make-outside-particles []
|
||||
(doto (assoc (particle-effect "outside-particles") :x 160 :y 120
|
||||
:baseline 238)
|
||||
(particle-effect! :set-position 160 120)))
|
||||
|
||||
@@ -370,6 +370,8 @@
|
||||
(concat p (reverse p))))
|
||||
:bird-2 (utils/make-bird screen (as-> [[220 225] [195 235] [210 230] [250 225]] p
|
||||
(concat p (reverse p))))
|
||||
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:door (assoc (animation->texture screen door)
|
||||
:x 160 :y 97 :baseline 99
|
||||
:open door
|
||||
@@ -486,6 +488,7 @@
|
||||
:collision "inside-castle/collision.png"
|
||||
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(as-> entities entities
|
||||
(if (actions/has-obtained? entities :trophy)
|
||||
(update-in entities [:room :entities] #(dissoc % :trophy))
|
||||
|
||||
@@ -381,6 +381,8 @@
|
||||
[220 225] [210 230] [250 235]] p
|
||||
(concat p (reverse p))))
|
||||
|
||||
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:flies (assoc (animation->texture screen flies-stand)
|
||||
:x 201
|
||||
:y 175
|
||||
@@ -410,6 +412,7 @@
|
||||
:scale-fn (utils/scaler-fn-from-image "outside-castle/scale-map.png" 0.20 1.00)
|
||||
:start-pos [259 80]
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(if (#{:night :sunrise} (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)))))
|
||||
|
||||
@@ -455,6 +455,8 @@
|
||||
:stand sheep-stand}
|
||||
:scaled true)
|
||||
sheep-stand)
|
||||
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:magic (assoc (doto (particle-effect "outsidehouse/magic") )
|
||||
:x 153
|
||||
:y 105
|
||||
@@ -514,6 +516,7 @@
|
||||
:collision "outsidehouse/collision.png"
|
||||
:scale-fn scaler
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :coaxed-sheep?])
|
||||
(let [scale ((get-in entities [:room :scale-fn]) [90 138])]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns advent.screens.rooms.outside-jail
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.actions :as actions]
|
||||
[advent.screens.items :as items]
|
||||
[advent.utils :as utils]
|
||||
@@ -198,7 +199,8 @@
|
||||
:baseline 114)
|
||||
:axe (assoc (texture "outside-jail/axe.png") :x 213 :y 63 :baseline 176 :night-profile :sprite)
|
||||
:bent-bar-window (assoc (texture "outside-jail/bent-bar-window.png")
|
||||
:x 69 :y (- 240 63) :baseline 2)}
|
||||
:x 69 :y (- 240 63) :baseline 2)
|
||||
:outside-particles (common/make-outside-particles)}
|
||||
:fountain-sound {:sound (sound "outside-jail/fountain-2.ogg")
|
||||
:id nil}
|
||||
|
||||
@@ -247,6 +249,7 @@
|
||||
entities)
|
||||
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
|
||||
(as-> entities entities
|
||||
(assoc-in entities [:room :fountain-sound :id] (sound! (get-in entities [:room :fountain-sound :sound]) :loop (fountain-vol entities)))
|
||||
|
||||
Reference in New Issue
Block a user