themedRollCredits support
This commit is contained in:
@@ -727,13 +727,25 @@
|
|||||||
(+= textY threeColSize creditMargin))
|
(+= textY threeColSize creditMargin))
|
||||||
(otherwise)))
|
(otherwise)))
|
||||||
|
|
||||||
(doFor text creditsText
|
(let [pixelsToScroll
|
||||||
(FlxG.state.add text)
|
(+ textY .height (last creditsText))
|
||||||
(set text.cameras [flxMovie.uiCamera])
|
idealTimeLimit
|
||||||
(let [:Array<Dynamic> tweenArgs []]
|
(/ pixelsToScroll IDEAL_SCROLL_SPEED)
|
||||||
(tweenArgs.push text)
|
timeLimitDifference (- idealTimeLimit timeLimit)
|
||||||
(tweenArgs.push text.x)
|
scrollSpeed
|
||||||
(tweenArgs.push (- text.y textY))
|
(if timeLimit
|
||||||
(tweenArgs.push 200)
|
(/ pixelsToScroll timeLimit)
|
||||||
(tweenArgs.push cc)
|
IDEAL_SCROLL_SPEED)]
|
||||||
(Reflect.callMethod flxMovie (Reflect.field flxMovie "linearMotion") tweenArgs))))
|
(#when debug
|
||||||
|
(when !(= scrollSpeed IDEAL_SCROLL_SPEED)
|
||||||
|
(print "Time given for credit roll (${timeLimit}s) is $(Math.abs timeLimitDifference)sec $(if (> timeLimitDifference 0) "too short" "too long") for ideal speed.")))
|
||||||
|
(doFor text creditsText
|
||||||
|
(FlxG.state.add text)
|
||||||
|
(set text.cameras [flxMovie.uiCamera])
|
||||||
|
(let [:Array<Dynamic> tweenArgs []]
|
||||||
|
(tweenArgs.push text)
|
||||||
|
(tweenArgs.push text.x)
|
||||||
|
(tweenArgs.push (- text.y textY))
|
||||||
|
(tweenArgs.push scrollSpeed)
|
||||||
|
(tweenArgs.push cc)
|
||||||
|
(Reflect.callMethod flxMovie (Reflect.field flxMovie "linearMotion") tweenArgs)))))
|
Reference in New Issue
Block a user