My game consists of 12 cards face down on a table, and each card corresponds to a scene. I am creating the scene instance inside the constructor of the card class since each card has exactly one corresponding scene. Each scene is just a big model with the camera moving around, and some sounds playing, but each scene is different.
Basically when I instantiate each scene, I want to define a function in that instance called “runFunc” that will contain the sequence of intervals needed for camera movement and sound.
Each scene has a starting camera location which I will know in advance. So my instantiation would look something like this:
newScene = Scene(sceneNum, sceneStartDummyNode)
newScene.runFunc = def():
#insert details of instance function here
I found out I could do this from my instructor, but he was a little fuzzy on the syntax. I just wanted to make sure this was correct.
Also, do I have to define the runFunc function in advance in the scene class like this:
def runFunc(self, num, startNode):
None
or does the newScene.runFunc = def() define the function for me?
Thanks in advance,
Adam