Module CorsixTH.CorsixTH.Lua.movie_player
Layer which handles the Lua-facing side of loading and playing video.
Functions
| MoviePlayer:init () | Initialises the different movies used in the game |
| MoviePlayer:onMovieOver () | Handles when the movie ends |
| 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. |
| MoviePlayer:playDemoMovie () | Plays the demo gameplay footage movie from TH |
| MoviePlayer:playIntro (callback_after_movie) | Plays the opening movie from TH |
| MoviePlayer:playLoseMovie () | Plays one of the lose scenario movies at random |
| MoviePlayer:playMovie (filename, wait_for_stop, can_skip, callback) | Function used to tell the Movie Player to play something. |
| MoviePlayer:playWinMovie () | Plays the movie for winning the game |
| MoviePlayer:stop () | Handles ending the movie prematurely (user input) |
Functions
- MoviePlayer:init ()
- Initialises the different movies used in the game
- MoviePlayer:onMovieOver ()
- Handles when the movie ends
- 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:
- level (number) What level we're going to.
- MoviePlayer:playDemoMovie ()
- Plays the demo gameplay footage movie from TH
- MoviePlayer:playIntro (callback_after_movie)
-
Plays the opening movie from TH
Parameters:
- callback_after_movie (function) What to do once movie ends
- MoviePlayer:playLoseMovie ()
- Plays one of the lose scenario movies at random
- MoviePlayer:playMovie (filename, wait_for_stop, can_skip, callback)
-
Function used to tell the Movie Player to play something.
Parameters:
- filename (string) Location of the movie file
- wait_for_stop (boolean) If true, movie will not dismiss automatically (requires a mouse/key press)
- can_skip (boolean) If true, the player can end movie prematurely
- callback (function) What to do after the movie ends
- MoviePlayer:playWinMovie ()
- Plays the movie for winning the game
- MoviePlayer:stop ()
- Handles ending the movie prematurely (user input)