Original Post
Hi, I have a game where jobs are generated by both the player and game objects. I have a Job class that holds the details of each job along with code that process the jobs. What I want to do is subclass the Jobs so that each individual Job has it's own subclass which will contain code unique to that job. For example, there might be a Mine job and a Build job which would both contain an action() method but with different code that I would want the job queue to call. The queue code is set to cycle through all objects of Job class, but as far as I know you can't access the child class from the parent. Is there a way I can put all the different Job subclasses into one queue and call their methods from there? Thanks in advance.