Exemplo n.º 1
0
                  "--height",
                  dest="height",
                  help="window height",
                  metavar="HEIGHT",
                  default=480,
                  type="int")

parser.add_option("-f",
                  "--font",
                  dest="font",
                  help="font size",
                  metavar="SIZE",
                  default=20,
                  type="int")

parser.add_option("-d",
                  "--difficulty",
                  dest="difficulty",
                  help="difficulty level",
                  metavar="DIFFICULTY",
                  default=0,
                  type="int")

(opts, args) = parser.parse_args()

ge = GameEngine(width=opts.width, height=opts.height, always_draw=False)
ge.add_object('font', font.SysFont(font.get_default_font(), opts.font))
ge.add_object('main', LemonadeMain(opts.difficulty))
ge.add_object('gui', LemonadeGui())
ge.start_main_loop()
Exemplo n.º 2
0
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.

from fortuneengine.GameEngine import GameEngine
from PPGameManager import PPGameManager
from PPMainMenu import MainMenuHolder
from PPGame import PPGame
from Constants import IMAGE_PATH

ge = GameEngine(width=952, height=714, always_draw=False)


def start_game():
    ge.add_object('manager', PPGameManager())


def menu_screen():
    ge.add_object(
        'menu',
        MainMenuHolder(menu_called,
                       IMAGE_PATH + "bg.gif",
                       width=ge.width,
                       height=ge.height))
    ge.get_object('menu').show_menu('title')