Changed how the periodically function works to only tick when an external value is true.
Changed how the random enemies spawn.