MoviePlayer Class
Method Index
- allocatePictureBuffer()
- deallocatePictureBuffer()
- init()
- onMovieOver()
- playAdvanceMovie(level)
- playDemoMovie()
- playIntro(callback_after_movie)
- playLoseMovie()
- playMovie(filename, wait_for_stop, callback)
- playWinLevelMovie()
- playWinMovie()
- refresh()
- stop()
- togglePause()
- updateRenderer()
Member Index
- advance_movies
- app
- audio
- callback_on_destroy_movie
- demo_movie
- holding_bg_music
- intro_movie
- lose_font
- lose_font_narrow
- lose_movies
- moviePlayer
- movie_length
- movie_over
- opengl_mode_index
- playing
- refresh_overlay
- sound
- video
- wait_for_over
- wait_for_stop
- win_game_movie
- win_level_movie
function MoviePlayer:MoviePlayer(app, audio, video)
Parameters:
| Name | Type | Description |
|---|---|---|
| app | ? | ? |
| audio | ? | ? |
| video | ? | ? |
Declared on: line 156 of Lua/movie_player.lua.
function MoviePlayer:allocatePictureBuffer()
NB: Call after any changes to TH.surface
Declared on: line 357 of Lua/movie_player.lua.
function MoviePlayer:deallocatePictureBuffer()
NB: Call before any changes to TH.surface
Declared on: line 364 of Lua/movie_player.lua.
function MoviePlayer:init()
Initialises the different movies used in the game
Declared on: line 177 of Lua/movie_player.lua.
function MoviePlayer:onMovieOver()
Handles when the movie ends
Declared on: line 371 of Lua/movie_player.lua.
function MoviePlayer:playAdvanceMovie(level)
Plays the level advance movie, which is going to the next level on the game board
This is for the original campaign only.
Parameters:
| Name | Type | Description |
|---|---|---|
| level | number | What level we're going to. |
Declared on: line 251 of Lua/movie_player.lua.
function MoviePlayer:playDemoMovie()
Plays the demo gameplay footage movie from TH
Declared on: line 236 of Lua/movie_player.lua.
function MoviePlayer:playIntro(callback_after_movie)
Plays the opening movie from TH
Parameters:
| Name | Type | Description |
|---|---|---|
| callback_after_movie | function | What to do once movie ends |
Declared on: line 230 of Lua/movie_player.lua.
function MoviePlayer:playLoseMovie()
Plays one of the lose scenario movies at random
Declared on: line 274 of Lua/movie_player.lua.
function MoviePlayer:playMovie(filename, wait_for_stop, callback)
Function used to tell the Movie Player to play something.
(requires a mouse/key press)
Parameters:
| Name | Type | Description |
|---|---|---|
| filename | string | Location of the movie file |
| wait_for_stop | boolean | If true, movie will not dismiss automatically |
| callback | function | What to do after the movie ends |
Declared on: line 284 of Lua/movie_player.lua.
function MoviePlayer:playWinLevelMovie()
Play the movie for winning the level
Declared on: line 246 of Lua/movie_player.lua.
function MoviePlayer:playWinMovie()
Plays the movie for winning the game
Declared on: line 241 of Lua/movie_player.lua.
function MoviePlayer:stop()
Handles ending the movie prematurely (user input)
Declared on: line 382 of Lua/movie_player.lua.