cut scene ... working ???
This commit is contained in:
parent
50322fedf5
commit
393af0b9b5
1 changed files with 28 additions and 0 deletions
|
@ -15,6 +15,30 @@ app.game =
|
|||
@hud.start()
|
||||
@speechbubble.start()
|
||||
|
||||
@cutScene = true
|
||||
@cutSceneImage = app.images.intro1
|
||||
|
||||
@intro = false
|
||||
@startCutScene()
|
||||
|
||||
# TODO: Refactor this whole crap ... I can't belive I am writing rthis ...
|
||||
startCutScene: ->
|
||||
window.setTimeout @cutScene2, 500
|
||||
|
||||
cutScene2: =>
|
||||
@cutSceneImage = app.images.intro2
|
||||
window.setTimeout @cutScene3, 500
|
||||
|
||||
cutScene3: =>
|
||||
@cutSceneImage = app.images.intro3
|
||||
window.setTimeout @cutScene4, 500
|
||||
|
||||
cutScene4: =>
|
||||
@cutSceneImage = app.images.intro4
|
||||
window.setTimeout @cutSceneEnd, 500
|
||||
|
||||
cutSceneEnd: =>
|
||||
@cutScene = false
|
||||
@intro = true
|
||||
@startIntro()
|
||||
|
||||
|
@ -41,6 +65,10 @@ app.game =
|
|||
app.game.speechbubble.setMouse()
|
||||
|
||||
render: ->
|
||||
if @cutScene
|
||||
app.layer.drawImage @cutSceneImage, 0, 0, 20*8, 15*8
|
||||
return
|
||||
|
||||
if @gameEndCheck()
|
||||
app.layer.drawImage app.images.end, 0, 0, 20*8, 15*8
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue