private void meStandard_OnSelected(object sender, EventArgs e) { var screen = new PlayerSelectScreen(2); screen.OnPlayerSelect = meStandard_PlayerSelect; XnaDartsGame.ScreenManager.AddScreen(screen); }
public void Initialize(int position, PlayerSelectScreen playerSelectScreen) { float completeWidth = widthReferencePoint.localPosition.x * 2f; float widthSteps = completeWidth / 8f; float startWidth = -completeWidth / 2f; float widthChoice = startWidth + (1 + position * 2) * widthSteps; float heightChoice = -95; rectTrans.localPosition = new Vector2(widthChoice, heightChoice); this.playerSelectScreen = playerSelectScreen; playerText.text = "P" + (position + 1).ToString(); leftArrow.color = playerColors[position]; rightArrow.color = playerColors[position]; playerText.color = playerColors[position]; float textOffset = ((1920 / 2f) - widthReferencePoint.localPosition.x) / 4f; Debug.Log(widthReferencePoint.localPosition.x); fireToJoinText.localPosition = new Vector2(fireToJoinText.localPosition.x - textOffset, fireToJoinText.localPosition.y); }
private void Bastard_OnSelected(object sender, EventArgs e) { var screen = new PlayerSelectScreen(new[] { 2, 4, 5 }); screen.OnPlayerSelect = Bastard_PlayerSelect; XnaDartsGame.ScreenManager.AddScreen(screen); }
public void Start() { Hardware hardware = new Hardware(800, 600, 24, false); IntroScreen intro = new IntroScreen(hardware, "sentece.txt"); MenuScreen menu = new MenuScreen(hardware); PlayerSelectScreen selectScreen = new PlayerSelectScreen(hardware); GameScreen game = new GameScreen(hardware); intro.Show(); do { menu.Show(); switch (menu.MenuOption) { case 0: game.Show(); break; case 1: selectScreen.Show(); break; case 2: game.Show(); break; case 3: exit = true; break; } } while (!exit); }
private void CountUp_OnSelected(object sender, EventArgs e) { var screen = new PlayerSelectScreen(4) { OnPlayerSelect = CountUp_PlayerSelect }; XnaDartsGame.ScreenManager.AddScreen(screen); }
// Use this for initialization void Start() { mLastSelectedButton = nomrenchButton; InitializeCharacterButtons(); UpdateCharacterInfoPanel(Model.selectedCharacter); inst = this; }
private void meStandard_OnSelected(object sender, EventArgs e) { var screen = new PlayerSelectScreen(2, 4) { OnPlayerSelect = players => { XnaDartsGame.ScreenManager.AddScreen(new CricketModeScreen((new Cricket(players)))); } }; XnaDartsGame.ScreenManager.AddScreen(screen); }
public void Initialize(int position, PlayerSelectScreen playerSelectScreen) { float completeWidth = widthReferencePoint.localPosition.x * 2f; float widthSteps = completeWidth / 8f; float startWidth = -completeWidth / 2f; float widthChoice = startWidth + (1 + position * 2) * widthSteps; float heightChoice = -95; rectTrans.localPosition = new Vector2(widthChoice, heightChoice); this.playerSelectScreen = playerSelectScreen; playerText.text = "P" + (position + 1).ToString(); leftArrow.color = playerColors[position]; rightArrow.color = playerColors[position]; playerText.color = playerColors[position]; float textOffset = ((1920 / 2f) - widthReferencePoint.localPosition.x) / 4f; Debug.Log(widthReferencePoint.localPosition.x); fireToJoinText.localPosition = new Vector2(fireToJoinText.localPosition.x - textOffset, fireToJoinText.localPosition.y); }
public void Start() { Hardware hardware = new Hardware(800, 600, 24, false); WelcomeScreen welcome = new WelcomeScreen(hardware); CreditsScreen credits = new CreditsScreen(hardware); PlayerSelectScreen playerSelect = new PlayerSelectScreen(hardware); GameScreen game = new GameScreen(hardware); do { hardware.ClearScreen(); welcome.Show(); if (!welcome.GetExit()) { playerSelect.Show(); game.ChosenPlayer = playerSelect.GetChosenPlayer(); hardware.ClearScreen(); game.Show(); hardware.ClearScreen(); credits.Show(); } } while (!welcome.GetExit()); }
private void Bastard_OnSelected(object sender, EventArgs e) { var screen = new PlayerSelectScreen(new[] {2, 4, 5}); screen.OnPlayerSelect = Bastard_PlayerSelect; XnaDartsGame.ScreenManager.AddScreen(screen); }
private void meStandard_OnSelected(object sender, EventArgs e) { var screen = new PlayerSelectScreen(2); screen.OnPlayerSelect = meStandard_PlayerSelect; XnaDartsGame.ScreenManager.AddScreen(screen); }
public void Start() { //TO DO Hardware hardware = new Hardware(SCREEN_WIDTH, SCREEN_HEIGHT, 24, false); IntroScreen intro = new IntroScreen(hardware); GameScreen game = new GameScreen(hardware); CreditsScreen credits = new CreditsScreen(hardware); PlayerSelectScreen playerSelect = new PlayerSelectScreen(hardware); ScoreBoardScreen scoreBoard; MainMenuScreen mainMenu = new MainMenuScreen(hardware); HelpScreen helpScreen = new HelpScreen(hardware); OptionsScreen optionsScreen = new OptionsScreen(hardware); intro.Show(); HordeModeScreen hordeMode; do { mainMenu.Show(); if (!mainMenu.GetExit()) { switch (mainMenu.GetChosenOption()) { case 1: playerSelect.Show(); game = new GameScreen(hardware); game.ChosenPlayer = playerSelect.ChosenPlayer(); game.Show(); break; case 2: if (lastGame != 0) { if (lastGame == 1) { playerSelect.Show(); game = new GameScreen(hardware); game.ChosenPlayer = playerSelect.ChosenPlayer(); game.Show(); } else { playerSelect.Show(); hordeMode = new HordeModeScreen(hardware); hordeMode.ChosenPlayer = playerSelect.ChosenPlayer(); hordeMode.Show(); } } break; case 3: playerSelect.Show(); hordeMode = new HordeModeScreen(hardware); hordeMode.ChosenPlayer = playerSelect.ChosenPlayer(); hordeMode.Show(); break; case 4: scoreBoard = new ScoreBoardScreen(hardware); scoreBoard.Show(); break; case 5: helpScreen.Show(); break; case 6: optionsScreen.Show(); break; case 7: credits.Show(); break; default: break; } } } while (!mainMenu.GetExit()); }