Professional Documents
Culture Documents
Threading Functions
https://roderickvella.wordpress.com
Mission Objectives
Welcome to your 7th mission. In this
mission we are going to learn how to
use threading and wait commands.
What is threading?
self iPrintlnBold(Hello);
wait(10);
self iPrintlnBold(World);
What is threading?
THIS IS NOT THREADING. FUNCTION1 HAS TO WAIT FOR FUNCTION2 TO DISPLAY MALTA
function1()
{
function2();
self iPrintlnBold(Malta);
function2()
{
self iPrintlnBold(Hello);
wait(10);
self iPrintlnBold(World);
}
What is threading?
What is threading?
THIS IS THREADING. FUNCTION1 DOES NOT HAVE TO WAIT FOR FUNCTION2 TO DISPLAY
MALTA
function1()
{
thread function2();
self iPrintlnBold(Malta);
}
function2()
{
wait(10);
self iPrintlnBold(Hello);
self iPrintlnBold(World);
}
Step 1
thread
showHidePlayer();
Line 137
self Hide();
Line 138
wait(5);
Line 139
self Show();
Step 2