Check to see if function was called?

Viewed 2981

How would i go about checking if a function was called? I have created a function to see if the level was completed like so:

func levelOneCompleted(){

}

When the level one is beat, i call the function levelOneCompleted().

The scene then goes to another scene. It's at this scene that i want to check if the function was called. I am thinking i can make some kind of "if statement".

if levelOneCompleted is called {
//do this

else{

//do this
}

What would be the best way of going about this?

2 Answers
Related