public void Init() { if (initPlayer2 == false && _twoplayer == true) { Objects.Add(GetPlayer2()); initPlayer2 = true; } if (initdone == false) { Objects.Add(GetPlayer()); Objects.Add(GetEnemy()); initdone = true; } if (initdone2 == true) //make sure only strong enemy spawn at the start of game { Enemy spawnedEnemy = SpawnMoreEnemy(); Objects.Add(spawnedEnemy); SpawnedEnemies.Add(spawnedEnemy); } if (initdone2 == false) { Frame inventory = new Frame("inventory", "Inventory", new Location(10, 10), 150, 150); inventory.AddButton(Color.DarkRed, Color.Red, inventory.Close); GuiEnvironment.GetRenderer().RegisterFrame(inventory); Frame help = new Frame("help", "Help and Controls", new Location(250, 10), 150, 250); help.AddButton(Color.DarkRed, Color.Red, help.Close); help.AddButton(Color.DarkBlue, Color.RoyalBlue, inventory.Toggle); GuiEnvironment.GetRenderer().RegisterFrame(help); initdone2 = true; } }
public TutorialButton(MainMenu m) { mainMenu = m; tutorialFrame = Frame.Create("Tutorial"); tutorialFrame.AddButton(new TutorialBasicButton()); tutorialFrame.AddButton(new TutorialSkillButton()); }
public TutorialButton(MainMenu m) { mainMenu = m; tutorialFrame = Frame.Create("Tutorial"); tutorialFrame.AddButton(new TutorialShootButton()); tutorialFrame.AddButton(new TutorialBuildButton()); tutorialFrame.AddButton(new TutorialSilenceButton()); tutorialFrame.AddButton(new TutorialSkillCapButton()); }
void Start() { Stats.StartUpRoutine(); //should be called once at the beginning of every game (include in loading script or smt) nif = (NetworkInterface)FindObjectOfType(typeof(NetworkInterface)); if(nif == null){ Instantiate(network); } sound = (Sound)FindObjectOfType(typeof(Sound)); if(sound == null) Instantiate(soundObject); mainMenuFrame = Frame.Create("Main Menu"); mainMenuFrame.AddButton(new LocalGameButton(this)); mainMenuFrame.AddButton(new NetworkedButton(this)); mainMenuFrame.AddButton(new TutorialButton(this)); mainMenuFrame.AddButton(new OptionsButton(this)); menuStack.Add(mainMenuFrame); }