private static void SetupGame() { int selectedGameInput = -1; do { Console.WriteLine("Select Persona Game"); // display list of available games as choices, starting at 1 foreach (GameTitle game in Enum.GetValues(typeof(GameTitle))) { Console.WriteLine($"{(int)game + 1}. {game}"); } // save temp choice int tempChoice = ConsolePrompt.PromptInt("Game"); // save and exit prompt if game choice is valid if (Enum.IsDefined(typeof(GameTitle), tempChoice - 1)) { selectedGameInput = tempChoice - 1; } }while (selectedGameInput < 0); GameTitle selectedGame = (GameTitle)selectedGameInput; currentGame = new GameProps(selectedGame); }
// This is the Entry Point for the entire Game (the console application) private static void Main() { var gameTitle = new GameTitle() { // TODO: Come up with a cooler title... Title = "Awesome Title!", TitleTextColor = Color.Aqua, // TODO: Put your name here... Author = "<Your Name Here!>", AuthorTextColor = Color.CadetBlue }; // Helper to pretty up and print the above variable GameSetupHandler.DisplayGameTitle(gameTitle); // This calls the Interface to { get; } a reference to our Player object we built earlier var player = CharacterCreator.Player; // Gets the players name from console input PlayerSetupHandler.WelcomePlayer(player); // User assigns their starting traits PlayerSetupHandler.SetPlayerTraits(player); // Game ends once 'BeginAdventure' returns GameSetupHandler.BeginAdventure(player, RoomCreator.YourBedroom); }
public void GetTitleTest( ) { for (int i = 0; i < 1000; i++) { Console.WriteLine(GameTitle.GetTitle(true)); } }
public Match(IEnumerable <MatchRequest> requests, GameFormat format, GameTitle title, GameMode mode) { Id = Guid.NewGuid(); Requests = requests; Format = format; Title = title; Mode = mode; }
public static void GenerateNewTitle( ) { if (AppSettings.Current.AllowRandomTitle) { AppSettings.Current.GameTitle = GameTitle.GetTitle(AppSettings.Current.AllowRandomTitleRoot); } else { AppSettings.Current.GameTitle = GameTitle.Defult; } App.Current.WindowTitle = AppSettings.Current.GameTitle.Content; }
public GameProps(GameTitle game) { string currentDir = Directory.GetCurrentDirectory(); Name = game; EncountFile = $@"{currentDir}\{game}\ENCOUNT.TBL"; IsBigEndian = game == GameTitle.P5; EntrySize = 24; StartingOffset = 22; PackageFolder = game == GameTitle.P4G ? $@"{currentDir}\BGME Config Package" : $@"{currentDir}\Encount Music Package"; TblPatchesFolder = $@"{PackageFolder}\tblpatches"; PatchesFolder = $@"{PackageFolder}\patches"; }
public static void DisplayGameTitle(GameTitle gameTitle) { var font = FigletFont.Default; var figlet = new Figlet(font); Console.ReplaceAllColorsWithDefaults(); Console.WriteLine(figlet.ToAscii(gameTitle.Title), gameTitle.TitleTextColor); Console.WriteLine(); Console.WriteLine("\t-- Written by " + gameTitle.Author + "--", gameTitle.AuthorTextColor); Console.WriteLine("\n\n"); Console.WriteWithGradient(ConsoleStrings.PressEnterPrompt, Color.Yellow, Color.DarkRed, 4); Console.ReadLine(); Console.ReplaceAllColorsWithDefaults(); Console.Clear(); }
private static void Main(string[] args) { #region Build World, Player WorldListBuilder.Generate(); #region Music - Used for testing will me moved to another location //SoundPlayer music = new SoundPlayer(); //music.SoundLocation = (@"../../.../Engine/Docs/Music/GodMode.wav"); //music.Play(); #endregion GameTitle.Title(); Console.WriteLine(""); LocationCurrent.CurrentLocation(); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("Type help to see list of commands"); Console.Write("> "); #endregion while (true) { Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("< " + Player._player.NamePlayer + "-" + Player._player.ClassPlayer + " > <" + Player._player.HpCurrent + "/" + Player._player.HpMax + " HP" + " >"); Console.Write("> "); string inputUser = Console.ReadLine(); if (string.IsNullOrWhiteSpace(inputUser)) { continue; } string lowerInput = inputUser.ToLower(); Console.WriteLine(" "); if (lowerInput == "exit") //upon exit save player data { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Saving character"); SavePlayerData.SaveGameData(Player._player); break; } ParseInput(lowerInput); } }
public static string ClassSelection(Player player) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); if (player.Hero == "mage") { string classSelect = $"CHARACTER CLASS SELECT FOR {player.Name}"; string fireMOpt = "FIRE MAGE"; string arcaneMOpt = "ARCANE MAGE"; string frostMOpt = "FROST MAGE"; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (classSelect.Length / 2)) + "}", classSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (fireMOpt.Length / 2)) + "}", "-> " + fireMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (arcaneMOpt.Length / 2)) + "}", arcaneMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (frostMOpt.Length / 2)) + "}", frostMOpt); break; case 2: Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (fireMOpt.Length / 2)) + "}", fireMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (arcaneMOpt.Length / 2)) + "}", "-> " + arcaneMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (frostMOpt.Length / 2)) + "}", frostMOpt); break; case 3: Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (fireMOpt.Length / 2)) + "}", fireMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (arcaneMOpt.Length / 2)) + "}", arcaneMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (frostMOpt.Length / 2)) + "}", "-> " + frostMOpt); break; default: if (counter == 4) { counter = 1; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (fireMOpt.Length / 2)) + "}", "-> " + fireMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (arcaneMOpt.Length / 2)) + "}", arcaneMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (frostMOpt.Length / 2)) + "}", frostMOpt); break; } else if (counter == 0) { counter = 3; Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (fireMOpt.Length / 2)) + "}", fireMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (arcaneMOpt.Length / 2)) + "}", arcaneMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (frostMOpt.Length / 2)) + "}", "-> " + frostMOpt); break; } break; } enter = Console.ReadKey(); Console.Clear(); } else { string classSelect = $"CHARACTER CLASS SELECT FOR {player}"; string berserkerOpt = "BERSERKER"; string swordMOpt = "SWORDMASTER"; string protectorOpt = "PROTECTOR"; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (classSelect.Length / 2)) + "}", classSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (swordMOpt.Length / 2)) + "}", "-> " + swordMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (berserkerOpt.Length / 2)) + "}", berserkerOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (protectorOpt.Length / 2)) + "}", protectorOpt); break; case 2: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (swordMOpt.Length / 2)) + "}", swordMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (berserkerOpt.Length / 2)) + "}", "-> " + berserkerOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (protectorOpt.Length / 2)) + "}", protectorOpt); break; case 3: Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (swordMOpt.Length / 2)) + "}", swordMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (berserkerOpt.Length / 2)) + "}", berserkerOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (protectorOpt.Length / 2)) + "}", "-> " + protectorOpt); break; default: if (counter == 4) { counter = 1; Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (swordMOpt.Length / 2)) + "}", "-> " + swordMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (berserkerOpt.Length / 2)) + "}", berserkerOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (protectorOpt.Length / 2)) + "}", protectorOpt); break; } else if (counter == 0) { counter = 3; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (swordMOpt.Length / 2)) + "}", swordMOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (berserkerOpt.Length / 2)) + "}", berserkerOpt); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (protectorOpt.Length / 2)) + "}", "-> " + protectorOpt); break; } break; } enter = Console.ReadKey(); Console.Clear(); } } if (player.Hero == "mage") { switch (counter) { case 1: return("fire"); case 2: return("arcane"); default: return("frost"); } } else { switch (counter) { case 1: return("swordmaster"); case 2: return("berserker"); default: return("protector"); } } }
public static string SelectType(string playerName) { int counter = 1; ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string classSelect = $"SELECT HERO TYPE FOR PLAYER {playerName}"; string warrOption = "WARRIOR"; string mageOption = "MAGE"; string quit = "QUIT"; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (classSelect.Length / 2)) + "}", classSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (mageOption.Length / 2)) + "}", "-> " + mageOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (warrOption.Length / 2)) + "}", warrOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (quit.Length / 2)) + "}", quit); break; case 2: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (mageOption.Length / 2)) + "}", mageOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (warrOption.Length / 2)) + "}", "-> " + warrOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (quit.Length / 2)) + "}", quit); break; case 3: Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (mageOption.Length / 2)) + "}", mageOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (warrOption.Length / 2)) + "}", warrOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (quit.Length / 2)) + "}", "-> " + quit); break; default: if (counter == 4) { counter = 1; Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (mageOption.Length / 2)) + "}", "-> " + mageOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (warrOption.Length / 2)) + "}", warrOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (quit.Length / 2)) + "}", quit); break; } else if (counter == 0) { counter = 3; Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (mageOption.Length / 2)) + "}", mageOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (warrOption.Length / 2)) + "}", warrOption); Console.WriteLine("{0," + ((Console.WindowWidth / 2) + (quit.Length / 2)) + "}", "-> " + quit); break; } break; } enter = Console.ReadKey(); Console.Clear(); } switch (counter) { case 1: { var currentType = "mage"; return(currentType); }; default: { var currentType = "warrior"; return(currentType); }; } }
private static CurrentSpell FrostMageCommands(Player mage) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {mage.Name}"; string frostArmor = $"FROST ARMOR-- GET 150 ARMOR, LOWER PHYSICAL DAMAGE BY 20% FOR 2 TURNS, COST: 100 MANA, COOLDOWN: 3"; string frostBolt = $"FROST BOLT-- DAMAGE ENEMY FOR {mage.Spellpower * 2}, LOWER ENEMY PHYSICAL DAMAGE DONE BY 20% FOR 2 TURNS, COST: 90 MANA, NO COOLDOWN"; string icyVeins = $"ICY VEINS-- LOWER COOLDOWN ON ALL SPELLS BY 1 TURN, GET 50% MORE SPELLPOWER FOR NEXT 3 TURNS, COST: 250 MANA, COOLDOWN: 4"; string frozenGround = $"FROZEN GROUND-- STUN ENEMY FOR 1 TURN AND DAMAGE HIM FOR 2 TURNS BY {mage.Spellpower}, COST: 150 MANA, COOLDOWN: 4"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0,2}", "-> " + frostArmor); Console.WriteLine("{0,2}", frostBolt); Console.WriteLine("{0,2}", icyVeins); Console.WriteLine("{0,2}", frozenGround); break; case 2: Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0,2}", frostArmor); Console.WriteLine("{0,2}", "-> " + frostBolt); Console.WriteLine("{0,2}", icyVeins); Console.WriteLine("{0,2}", frozenGround); break; case 3: Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0,2}", frostArmor); Console.WriteLine("{0,2}", frostBolt); Console.WriteLine("{0,2}", "-> " + icyVeins); Console.WriteLine("{0,2}", frozenGround); break; case 4: Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0,2}", frostArmor); Console.WriteLine("{0,2}", frostBolt); Console.WriteLine("{0,2}", icyVeins); Console.WriteLine("{0,2}", "-> " + frozenGround); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0,2}", "-> " + frostArmor); Console.WriteLine("{0,2}", frostBolt); Console.WriteLine("{0,2}", icyVeins); Console.WriteLine("{0,2}", frozenGround); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("{0,2}", frostArmor); Console.WriteLine("{0,2}", frostBolt); Console.WriteLine("{0,2}", icyVeins); Console.WriteLine("{0,2}", "-> " + frozenGround); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var frostArmor = new FrostArmor(); currentSpell = frostArmor.GetFrostArmor(mage); break; case 2: var frostBolt = new FrostBolt(); currentSpell = frostBolt.GetFrostBolt(mage); break; case 3: var icyVeins = new IcyVeins(); currentSpell = icyVeins.GetIcyVeins(mage); break; default: var frozenGround = new FrozenGround(); currentSpell = frozenGround.GetFrozenGround(mage); break; } return(currentSpell); }
private static CurrentSpell ArcaneMageCommands(Player mage) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {mage.Name}"; string polymorph = $"POLYMORPH-- DISABLE TARGET FOR 2 TURNS, COST: 200 MANA, COOLDOWN: 4"; string arcaneBlast = $"ARCANE BLAST-- DAMAGE:{mage.Spellpower * 3}, COST: 90 MANA, , NO COOLDOWN"; string amplifier = $"AMPLIFY MAGIC-- DOUBLE SPELL DAMAGE FOR NEXT 2 TURNS, COST: 250 MANA, COOLDOWN: 4"; string manaRegen = $"MANA REGENERATION-- GET 300 MANA, COOLDOWN: 3"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0,2}", "-> " + polymorph); Console.WriteLine("{0,2}", arcaneBlast); Console.WriteLine("{0,2}", amplifier); Console.WriteLine("{0,2}", manaRegen); break; case 2: Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0,2}", polymorph); Console.WriteLine("{0,2}", "-> " + arcaneBlast); Console.WriteLine("{0,2}", amplifier); Console.WriteLine("{0,2}", manaRegen); break; case 3: Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0,2}", polymorph); Console.WriteLine("{0,2}", arcaneBlast); Console.WriteLine("{0,2}", "-> " + amplifier); Console.WriteLine("{0,2}", manaRegen); break; case 4: Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0,2}", polymorph); Console.WriteLine("{0,2}", arcaneBlast); Console.WriteLine("{0,2}", amplifier); Console.WriteLine("{0,2}", "-> " + manaRegen); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0,2}", "-> " + polymorph); Console.WriteLine("{0,2}", arcaneBlast); Console.WriteLine("{0,2}", amplifier); Console.WriteLine("{0,2}", manaRegen); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("{0,2}", polymorph); Console.WriteLine("{0,2}", arcaneBlast); Console.WriteLine("{0,2}", amplifier); Console.WriteLine("{0,2}", "-> " + manaRegen); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var polymorph = new Polymorph(); currentSpell = polymorph.GetPolymorph(mage); break; case 2: var arcaneBlast = new ArcaneBlast(); currentSpell = arcaneBlast.GetArcaneBlast(mage); break; case 3: var amplifier = new Amplifier(); currentSpell = amplifier.GetAmplifier(mage); break; default: var manaReg = new ManaRegeneration(); currentSpell = manaReg.GetManaReg(mage); break; } return(currentSpell); }
void Awake() { //Check if instance already exists if (Instance == null) { //if not, set instance to this Instance = this; LoadingGameSettings = true; LoadingPlayerSettings = true; LoadingHeroData = true; LoadingWorldData = true; // only time game state will be null is if in slapsh scene in which case I will // assign main menu as next in most case. in the case that it is not next, // I will let the Login dialog logic sort out what to do AddToSceneBreadCrumb(GameState.Constants.SCENE_START_MENU, GameState.Constants.START_MENU); } //If instance already exists and it's not this: else if (Instance != this) { //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a GameManager. Destroy(gameObject); // allow this class to persist from scene-to-scene } DontDestroyOnLoad(gameObject); // gather all the game menus if (GameTitleInScene == null) { GameTitleInScene = Object.FindObjectOfType <GameTitle>(); } if (OptionsMenuInScene == null) { OptionsMenuInScene = Object.FindObjectOfType <OptionsMenu>(); } if (MainMenuInScene == null) { MainMenuInScene = Object.FindObjectOfType <MainMenu>(); } if (StartMenuInScene == null) { StartMenuInScene = Object.FindObjectOfType <StartMenu>(); } if (GameSettingsInScene == null) { GameSettingsInScene = Object.FindObjectOfType <GameSettings>(); } if (CharacterCustomizationInScene == null) { CharacterCustomizationInScene = Object.FindObjectOfType <CharacterCustomization>(); } if (SaveGameStateDialogInScene == null) { SaveGameStateDialogInScene = Object.FindObjectOfType <SaveGameStateDialog>(); } if (LoginDialogInScene == null) { LoginDialogInScene = Object.FindObjectOfType <LoginDialog>(); } if (CharacterSelectionInScene == null) { CharacterSelectionInScene = Object.FindObjectOfType <CharacterSelection>(); } if (LevelMenuInScene == null) { LevelMenuInScene = Object.FindObjectOfType <LevelMenu>(); } if (HUDMenuInScene == null) { HUDMenuInScene = Object.FindObjectOfType <HUDMenu>(); } }
private static CurrentSpell FireMageCommands(Player mage) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {mage.Name}"; string fireBlast = $"FIRE BLAST-- DAMAGE:{mage.Spellpower * 2} COST: 120 MANA, NO COOLDOWN"; string fireArmor = $"FIRE ARMOR-- GET 150 ARMOR AND 150 HEALTH, COST: 80 MANA, COOLDOWN: 3"; string pyroBlast = $"PYRO BLAST-- DAMAGE:{mage.Spellpower * 5} COST: 250 MANA, COOLDOWN: 4"; string incinerate = $"INCINERATE-- KILL ENEMY IF ENEMY HP IS BELOW 900"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", "-> " + fireBlast); Console.WriteLine("{0,2}", fireArmor); Console.WriteLine("{0,2}", pyroBlast); Console.WriteLine("{0,2}", incinerate); break; case 2: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", fireBlast); Console.WriteLine("{0,2}", "-> " + fireArmor); Console.WriteLine("{0,2}", pyroBlast); Console.WriteLine("{0,2}", incinerate); break; case 3: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", fireBlast); Console.WriteLine("{0,2}", fireArmor); Console.WriteLine("{0,2}", "-> " + pyroBlast); Console.WriteLine("{0,2}", incinerate); break; case 4: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", fireBlast); Console.WriteLine("{0,2}", fireArmor); Console.WriteLine("{0,2}", pyroBlast); Console.WriteLine("{0,2}", "-> " + incinerate); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", "-> " + fireBlast); Console.WriteLine("{0,2}", fireArmor); Console.WriteLine("{0,2}", pyroBlast); Console.WriteLine("{0,2}", incinerate); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", fireBlast); Console.WriteLine("{0,2}", fireArmor); Console.WriteLine("{0,2}", pyroBlast); Console.WriteLine("{0,2}", "-> " + incinerate); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var fireBlast = new FireBlast(); currentSpell = fireBlast.GetFireBlast(mage); break; case 2: var fireArmor = new FireArmor(); currentSpell = fireArmor.GetFireArmor(mage); break; case 3: var pyroBlast = new PyroBlast(); currentSpell = pyroBlast.GetPyroBlast(mage); break; default: var incinerate = new Incinerate(); currentSpell = incinerate.Incineration(mage); break; } return(currentSpell); }
private static CurrentSpell ProtectorCommands(Player warrior) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {warrior.Name}"; string shieldSlam = $"SHIELD SLAM-- DEAL {warrior.Armor} DAMAGE, STUN OPPONENT FOR HIS TURN, COOLDOWN: 2"; string maceSwing = $"MACE SWING-- DAMAGE:{warrior.Damage * 1.5}, NO COOLDOWN"; string armorUp = $"ARMOR UP-- GAIN 200 ARMOR, NO COOLDOWN"; string hibernate = $"HIBERNATE-- HEAL FOR {warrior.HealthRegen*4}, TAKE 50% DAMAGE REDUCTION FOR OPPONENT'S TURN, COOLDOWN: 3"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0,2}", "-> " + shieldSlam); Console.WriteLine("{0,2}", maceSwing); Console.WriteLine("{0,2}", armorUp); Console.WriteLine("{0,2}", hibernate); break; case 2: Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0,2}", shieldSlam); Console.WriteLine("{0,2}", "-> " + maceSwing); Console.WriteLine("{0,2}", armorUp); Console.WriteLine("{0,2}", hibernate); break; case 3: Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0,2}", shieldSlam); Console.WriteLine("{0,2}", maceSwing); Console.WriteLine("{0,2}", "-> " + armorUp); Console.WriteLine("{0,2}", hibernate); break; case 4: Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0,2}", shieldSlam); Console.WriteLine("{0,2}", maceSwing); Console.WriteLine("{0,2}", armorUp); Console.WriteLine("{0,2}", "-> " + hibernate); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0,2}", "-> " + shieldSlam); Console.WriteLine("{0,2}", maceSwing); Console.WriteLine("{0,2}", armorUp); Console.WriteLine("{0,2}", hibernate); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("{0,2}", shieldSlam); Console.WriteLine("{0,2}", maceSwing); Console.WriteLine("{0,2}", armorUp); Console.WriteLine("{0,2}", "-> " + hibernate); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var shieldSlam = new ShieldSlam(); currentSpell = shieldSlam.GetShieldSlam(warrior); break; case 2: var maceSwing = new MaceSwing(); currentSpell = maceSwing.GetMaceSwing(warrior); break; case 3: var armorUpSpell = new ArmorUp(); currentSpell = armorUpSpell.GetArmorUp(warrior); break; default: var hibernate = new Hibernate(); currentSpell = hibernate.GetHibernate(warrior); break; } return(currentSpell); }
private static CurrentSpell BerserkerCommands(Player warrior) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {warrior.Name}"; string goBerserk = $"BERSERK MODE-- DO DOUBLE DAMAGE FOR NEXT 3 ROUNDS, COST: 200HP, COOLDOWN: 5"; string axeChop = $"AXE CHOP-- DAMAGE:{warrior.Damage * 2}, NO COOLDOWN"; string wildAxes = $"WILD AXES-- DAMAGE:{warrior.Damage * 4}, COOLDOWN: 3"; string execute = $"EXECUTE-- KILL ENEMY IF HIS HP IS BELOW 700"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", "-> " + goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", execute); break; case 2: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", "-> " + axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", execute); break; case 3: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", "-> " + wildAxes); Console.WriteLine("{0,2}", execute); break; case 4: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", "-> " + execute); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", "-> " + goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", execute); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", "-> " + execute); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var berserk = new Berserk(); currentSpell = berserk.GoBerserk(warrior); break; case 2: var axeHit = new AxeChop(); currentSpell = axeHit.GetHit(warrior); break; case 3: var wildAxe = new WildAxes(); currentSpell = wildAxe.GetWildAxes(warrior); break; default: var execution = new Execute(); currentSpell = execution.GetExecution(warrior); break; } return(currentSpell); }
public Preference(GameTitle title, GameMode mode) { Title = title; Mode = mode; }
//Title private void loadTitleContents() { titleFont = Content.Load<SpriteFont>("TitleFont"); gameFont = Content.Load<SpriteFont>("GameFont"); menuFont = Content.Load<SpriteFont>("MenuFont"); title = new GameTitle(Content.Load<Texture2D>("screenshot_for_menu"), new Rectangle(0, 0, (int)(ScreenWidth), (int)(ScreenHeight))); title.setBottomTextRectangle(gameFont.MeasureString("Press Start")); startPosition = new Vector2(title.BottomTextRectangle.X, title.BottomTextRectangle.Y); }
public void LoadTitleTest( ) { GameTitle.LoadTitles( ); }
private void Awake() { m_scriptSplashLogo = Logo_Splash_Dorage.GetComponent <SplashLogo>(); m_scriptGameTitle = Logo_Game_Title.GetComponent <GameTitle>(); }
private static CurrentSpell SwordMCommands(Player warrior) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {warrior.Name}"; string levelUpCrit = $"CRITICAL STRIKE-- LOSE THIS TURN AND HAVE 30% CHANCE FOR 2X CRITICAL STRIKE FOR EACH ACTION YOUR SWORDMASTER DOES UNTIL END OF GAME"; string mirrorImage = $"MIRROR IMAGE-- YOUR OPONENT LOSES 1 TURN, YOU DEAL {warrior.Damage} TO HIM, COOLDOWN: 3"; string bladeSlash = $"BLADESLASH-- DAMAGE:{warrior.Damage * 2} NO COOLDOWN"; string windFury = $"WINDFURY-- DAMAGE:{warrior.Damage * 5} COOLDOWN: 4"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0,2}", "-> " + levelUpCrit); Console.WriteLine("{0,2}", mirrorImage); Console.WriteLine("{0,2}", bladeSlash); Console.WriteLine("{0,2}", windFury); break; case 2: Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0,2}", levelUpCrit); Console.WriteLine("{0,2}", "-> " + mirrorImage); Console.WriteLine("{0,2}", bladeSlash); Console.WriteLine("{0,2}", windFury); break; case 3: Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0,2}", levelUpCrit); Console.WriteLine("{0,2}", mirrorImage); Console.WriteLine("{0,2}", "-> " + bladeSlash); Console.WriteLine("{0,2}", windFury); break; case 4: Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0,2}", levelUpCrit); Console.WriteLine("{0,2}", mirrorImage); Console.WriteLine("{0,2}", bladeSlash); Console.WriteLine("{0,2}", "-> " + windFury); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0,2}", "-> " + levelUpCrit); Console.WriteLine("{0,2}", mirrorImage); Console.WriteLine("{0,2}", bladeSlash); Console.WriteLine("{0,2}", windFury); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0,2}", levelUpCrit); Console.WriteLine("{0,2}", mirrorImage); Console.WriteLine("{0,2}", bladeSlash); Console.WriteLine("{0,2}", "-> " + windFury); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var criticalStrike = new CriticalStrike(); currentSpell = criticalStrike.TurnOnCrit(warrior); break; case 2: var mirrorImage = new MirrorImage(); currentSpell = mirrorImage.GetMirrorImage(warrior); break; case 3: var slash = new BladeSlash(); currentSpell = slash.GetSlash(warrior); break; default: var windfury = new Windfury(); currentSpell = windfury.GetWindFury(warrior); break; } return(currentSpell); }