CorsixTH Lua Documentation

MoviePlayer Class

Declared on: line 26 of Lua/movie_player.lua.

Method Index

Member Index

function MoviePlayer:MoviePlayer(app, audio, video)

Parameters:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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.