linearmotion macros accept connectedsprites
This commit is contained in:
@@ -189,7 +189,7 @@
|
|||||||
position (resolvePosition positionKey holderType)]
|
position (resolvePosition positionKey holderType)]
|
||||||
(linearMotion skipping sprite position.x position.y speed cc soundLoop volumeMod connectedSprites)))
|
(linearMotion skipping sprite position.x position.y speed cc soundLoop volumeMod connectedSprites)))
|
||||||
|
|
||||||
(defMacro _linearMotionTo [withMacro await objectKey positionKey speed soundLoop volumeMod]
|
(defMacro _linearMotionTo [withMacro await objectKey positionKey speed soundLoop volumeMod connectedSprites]
|
||||||
`(,withMacro ,objectKey o
|
`(,withMacro ,objectKey o
|
||||||
(linearMotionTo
|
(linearMotionTo
|
||||||
skipping
|
skipping
|
||||||
@@ -198,16 +198,13 @@
|
|||||||
,speed
|
,speed
|
||||||
,(if (eval await) `cc `null)
|
,(if (eval await) `cc `null)
|
||||||
,soundLoop
|
,soundLoop
|
||||||
,volumeMod)
|
,volumeMod
|
||||||
|
(array FlxSprite ,@connectedSprites))
|
||||||
,(if (eval await) `null `(cc))))
|
,(if (eval await) `null `(cc))))
|
||||||
|
|
||||||
(defMacroFunction tryRead [stream]
|
|
||||||
(try (read stream)
|
|
||||||
(catch [e] `null)))
|
|
||||||
|
|
||||||
(defMacroFunction awaitLMTReaderMacro [stream withMacro await]
|
(defMacroFunction awaitLMTReaderMacro [stream withMacro await]
|
||||||
(let [nextLineStream (stream.expect "hollywoo macro line" ->(stream.takeLineAsStream))
|
(let [nextLineStream (stream.expect "hollywoo macro line" ->(stream.takeLineAsStream))
|
||||||
exps [(read nextLineStream) (read nextLineStream) (read nextLineStream) (tryRead nextLineStream) (tryRead nextLineStream)]]
|
exps [(read nextLineStream) (read nextLineStream) (read nextLineStream) (readOr nextLineStream `null) (readOr nextLineStream `null) (readOr nextLineStream `[])]]
|
||||||
`(_linearMotionTo ,withMacro ,await ,@exps)))
|
`(_linearMotionTo ,withMacro ,await ,@exps)))
|
||||||
|
|
||||||
(defReaderMacro "AWAITLINEARMOTIONACTORTO" [stream &builder b]
|
(defReaderMacro "AWAITLINEARMOTIONACTORTO" [stream &builder b]
|
||||||
@@ -223,7 +220,7 @@
|
|||||||
(awaitLMTReaderMacro stream `withPropCC false))
|
(awaitLMTReaderMacro stream `withPropCC false))
|
||||||
|
|
||||||
|
|
||||||
(defMacro _linearMotion [withMacro await objectKey _x _y speed soundLoop volumeMod]
|
(defMacro _linearMotion [withMacro await objectKey _x _y speed soundLoop volumeMod connectedSprites]
|
||||||
`(,withMacro ,objectKey o
|
`(,withMacro ,objectKey o
|
||||||
(let [x o.x y o.y]
|
(let [x o.x y o.y]
|
||||||
(linearMotion
|
(linearMotion
|
||||||
@@ -234,12 +231,16 @@
|
|||||||
,speed
|
,speed
|
||||||
,(if (eval await) `cc `null)
|
,(if (eval await) `cc `null)
|
||||||
,soundLoop
|
,soundLoop
|
||||||
,volumeMod))
|
,volumeMod
|
||||||
|
(array FlxSprite ,@connectedSprites)))
|
||||||
,(if (eval await) `null `(cc))))
|
,(if (eval await) `null `(cc))))
|
||||||
|
|
||||||
|
// This looks like duplication of the above,
|
||||||
|
// but these ones use the version of the function without TO
|
||||||
|
|
||||||
(defMacroFunction awaitLMReaderMacro [stream withMacro await]
|
(defMacroFunction awaitLMReaderMacro [stream withMacro await]
|
||||||
(let [nextLineStream (stream.expect "hollywoo macro line" ->(stream.takeLineAsStream))
|
(let [nextLineStream (stream.expect "hollywoo macro line" ->(stream.takeLineAsStream))
|
||||||
exps [(read nextLineStream) (read nextLineStream) (read nextLineStream) (read nextLineStream) (tryRead nextLineStream) (tryRead nextLineStream)]]
|
exps [(read nextLineStream) (read nextLineStream) (read nextLineStream) (read nextLineStream) (readOr nextLineStream `null) (readOr nextLineStream `null) (readOr nextLineStream `[])]]
|
||||||
`(_linearMotion ,withMacro ,await ,@exps)))
|
`(_linearMotion ,withMacro ,await ,@exps)))
|
||||||
|
|
||||||
(defReaderMacro "AWAITLINEARMOTIONACTOR" [stream &builder b]
|
(defReaderMacro "AWAITLINEARMOTIONACTOR" [stream &builder b]
|
||||||
|
Reference in New Issue
Block a user