Add a function to control spawning.
Merge pull request #4 from cnelsonsic/add_spawn_func

Add a function to control spawning.