Here I am again frustrated with a language that I’m unfamiliar with. So here goes.
Seeing that I’m coming up with a demo game, I need help separating all of the various classes, variables etc. into individual modules.
I’ll start with a simple example.
I want to create a Camera class in a file camera.py. Alright, simple. When the class initiallizes, it should set the camera to a default position. The Camera class contains functions to move the camera, let’s say moveCameraLeft and moveCameraRight. Exactly what these funtions do is not important.
No I go to my main module.
- How do I ‘import’ the camera object so that I canm use it?
- What information do I need to supply the Camera class in order to use the same camera that seems to be created upon startup of the main class? (let’s call it class World(DirectObject)).
- How do I use the functions moveCameraRight & moveCameraLeft and have it move the same camera that’s been created in World()?
I hope my question makes sense. Thanks!
Leeor
=============================================
Update: I figured out my problem… grr… silly me. I forgot to use base.disableMouse().