Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
TrialEndedScreen.cs
浏览该文件的文档.
1using System.Xml.Linq;
2
3namespace Game {
4 public class TrialEndedScreen : Screen {
6
8
10
12 XElement node = ContentManager.Get<XElement>("Screens/TrialEndedScreen");
13 LoadContents(this, node);
14 m_buyButton = Children.Find<ButtonWidget>("Buy", false);
15 m_quitButton = Children.Find<ButtonWidget>("Quit", false);
16 m_newWorldButton = Children.Find<ButtonWidget>("NewWorld", false);
17 }
18
19 public override void Update() {
20 if (m_buyButton != null
21 && m_buyButton.IsClicked) {
23 ScreensManager.SwitchScreen("MainMenu");
24 }
25 if ((m_quitButton != null && m_quitButton.IsClicked)
26 || Input.Back) {
27 ScreensManager.SwitchScreen("MainMenu");
28 }
29 if (m_newWorldButton != null
30 && m_newWorldButton.IsClicked) {
31 ScreensManager.SwitchScreen("NewWorld");
32 }
33 }
34 }
35}
readonly WidgetsList Children
static object Get(Type type, string name)
static void SwitchScreen(string name, params object[] parameters)
virtual void LoadContents(object eventsTarget, XElement node)