Quote:
Originally Posted by Gambet
If you can't explain it, then it's the same as not understanding.
|
Ok, consider:
a:
PHP Code:
function onPlayerEnters()
{
onCreated();
}
b:
PHP Code:
function onCreated()
{
onPlayerEnters();
}
Now, if a player enters the level with
a: onPlayerEnters() gets called and onCreated() gets called then the rest of the script gets executed
b: onPlayerEnters() gets called and the rest of the script executes.
Since onPlayerEnters will get called more than onCreated() b is the most efficient.
I don't think i can explain it any clearer than that.