public WorldEnemy(SpellswordGame game, World gameWorld, Point pointLocation, Character enemy) { shouldDraw = true; this.game = game; this.gameWorld = gameWorld; thisEntity = enemy; if (thisEntity is Character) { ((Character)thisEntity).Died += OnEntityDied; } //Temp test this.CurrentSprite = game.Content.Load <Texture2D>(enemy.WorldImage); this.pointLocation = pointLocation; this.Location = gameWorld.GetTileLocation(pointLocation); gameWorld.RegisterEntity(this, pointLocation); if (this.thisEntity is Dragon) { this.Location -= new Vector2(32, 32); gameWorld.RegisterEntity(this, new Point(pointLocation.X - 1, pointLocation.Y)); gameWorld.RegisterEntity(this, new Point(pointLocation.X + 1, pointLocation.Y)); gameWorld.RegisterEntity(this, new Point(pointLocation.X, pointLocation.Y - 1)); gameWorld.RegisterEntity(this, new Point(pointLocation.X, pointLocation.Y + 1)); gameWorld.RegisterEntity(this, new Point(pointLocation.X - 1, pointLocation.Y - 1)); gameWorld.RegisterEntity(this, new Point(pointLocation.X - 1, pointLocation.Y + 1)); gameWorld.RegisterEntity(this, new Point(pointLocation.X + 1, pointLocation.Y - 1)); gameWorld.RegisterEntity(this, new Point(pointLocation.X + 1, pointLocation.Y + 1)); } }
public BackCommand(SpellswordGame game, Menu newMenu, Menu oldMenu) { this.Name = "Back"; this.Description = "Go Back"; this.game = game; this.newMenu = newMenu; this.oldMenu = oldMenu; }
public SwitchMenuCommand(string Name, SpellswordGame game, Menu oldMenu, Menu newMenu) { this.Name = Name; this.Description = "Go to " + newMenu.ToString(); this.game = game; this.oldMenu = oldMenu; this.newMenu = newMenu; }
public StatusMenu(SpellswordGame game, Player player) : base(game, "") { this.CurrentSprite = game.Content.Load <Texture2D>("Menu"); this.AnchorTopLeft(game); this.player = player; this.SwitchOutString(GetPlayerStatus()); }
public TextMenu(SpellswordGame game, List <string> currentText) : base(game) { this.color = new Color(Color.Black, 1f); CurrentSprite = game.Content.Load <Texture2D>("EquipmentMenu"); this.AnchorTopRight(game); this.currentText = currentText; }
public RunCommand(SpellswordGame game, Character player, Character enemy) { this.game = game; this.player = player; this.enemy = enemy; Name = "Run"; Description = "Run Away"; }
public SwitchWeaponCommand(SpellswordGame game, EquipmentMenu oldMenu, Player player, IWeapon weapon, int weaponIndex) { this.game = game; this.oldMenu = oldMenu; this.player = player; this.weaponIndex = weaponIndex; this.Name = weapon.Name; this.Description = weapon.Description; }
public TalentMenu(SpellswordGame game, Player player) : base(game) { this.color = new Color(Color.Black, 0.85f); CurrentSprite = game.Content.Load <Texture2D>("Menu"); this.AnchorTopLeft(game); textMenu = new TextMenu(game, ""); this.player = player; this.currentCommands = GenerateCommands(); }
public BattleMenu(SpellswordGame game, Character player, Character enemy, IWeapon weapon, List <ISpellswordCommand> commands) : base(game, commands) { controller = new BattleController(game); CurrentSprite = game.Content.Load <Texture2D>("BattleMenu"); AnchorBottomLeft(game); this.player = player; this.enemy = enemy; this.currentWeapon = weapon; }
public BattlePlayer(SpellswordGame game, BattleScene currentScene, Player player) { this.CurrentSprite = game.Content.Load <Texture2D>(player.BattleImage); this.Location = Parameters.battlePlayerLocation; this.game = game; this.currentScene = currentScene; this.ThisEntity = player; this.CurrentState = BattlePlayerState.Waiting; }
public MenuScene(SpellswordGame game, Menu menu) { inputHandler = game.Services.GetService <InputHandler>(); if (inputHandler == null) { inputHandler = new InputHandler(game); game.Components.Add(inputHandler); } this.game = game; currentMenu = menu; }
public Menu(SpellswordGame game, List <ISpellswordCommand> commands) { thisGame = game; controller = new MenuController(game); currentCommands = commands; currentTopCommand = 0; this.color = new Color(Color.Black, 0.85f); font = game.Content.Load <SpriteFont>("Arial"); CurrentSprite = game.Content.Load <Texture2D>("Menu"); AnchorTopLeft(game); }
public WorldSword(SpellswordGame game, World gameWorld, Point startingLocation, Weapon thisItem) { shouldDraw = true; this.game = game; this.gameWorld = gameWorld; this.thisEntity = thisItem; this.CurrentSprite = game.Content.Load <Texture2D>(thisItem.WorldImage); this.pointLocation = startingLocation; this.Location = gameWorld.GetTileLocation(pointLocation); gameWorld.RegisterEntity(this, pointLocation); }
public WalkingPlayer(SpellswordGame game, World gameWorld) { this.game = game; this.gameWorld = gameWorld; this.thisEntity = new Player("BackwardsStill", "Spellsword"); animator = new Animator(game, this); controller = new PlayerController(game); this.CurrentTileLocation = new Point(8, 21); this.Location = gameWorld.GetTileLocation(CurrentTileLocation); CurrentSprite = game.Content.Load <Texture2D>(((Player)thisEntity).WorldImage); CurrentWalkingState = WalkingState.Still; MovementQueue = new Stack <Vector2>(); }
public MainMenu(SpellswordGame game, MenuScene scene) : this(game, new List <ISpellswordCommand>()) { }
public TextMenu(SpellswordGame game, string currentText) : this(game, new List <string> { currentText }) { }
public EmptyTile(SpellswordGame game, World world, Point pointLocation) { this.CurrentSprite = game.Content.Load <Texture2D>("EmptyTile"); this.Location = world.GetTileLocation(pointLocation); }
public BattleMenu(SpellswordGame game, Character player, Character enemy, IWeapon weapon) : this(game, player, enemy, weapon, new List <ISpellswordCommand>()) { LoadBasicCommands(); }
public Menu(SpellswordGame game) : this(game, new List <ISpellswordCommand>()) { }
public MainMenu(SpellswordGame game, List <ISpellswordCommand> commands) : base(game, commands) { thisGame = game; }
static void Main() { using (var game = new SpellswordGame()) game.Run(); }