将菜单项添加到游戏中 [英] Adding Menu Items to Games

查看:122
本文介绍了将菜单项添加到游戏中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个乒乓球游戏,我想连接到一个经典的乒乓球比赛,但我不知道将两者连接在一起的是谁。如何在表单上为我的代码的粗体部分添加菜单项?



这是代码(我希望我做对了):



Public Sub New()

Title =ScoontzPong

MenuItems =新列表(字符串)()

MenuItems.Add(单人游戏)

MenuItems.Add(多人游戏)

MenuItems.Add(退出游戏)

FormScoontzPongClassic.Show(玩经典游戏)

FormGames.Show(返回游戏)

About.Show( 关于ScoontzPong)


Iterator = 0

InfoText = String.Empty

End Sub

I have a ping pong game that I want to connect to a classic ping pong game, however I don't know who to connect the two together. How do I add menu items on the form for the bold sections of my code?

Here is the code (I hope I done it right):

Public Sub New()
Title = "ScoontzPong"
MenuItems = New List(Of String)()
MenuItems.Add("Single Player")
MenuItems.Add("Multi Player")
MenuItems.Add("Exit Game")
FormScoontzPongClassic.Show("Play Classic Game")
FormGames.Show("Back to Games")
About.Show("About ScoontzPong")

Iterator = 0
InfoText = String.Empty
End Sub

推荐答案

这篇关于将菜单项添加到游戏中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆