////////////////////////////////////// ////////// INITIALISATION ////////// ////////////////////////////////////// protected override void Initialize() { _crossedSwordsButton = new CrossedSwordsButton(Content); Characters.Add(_soldierSprite); Characters.Add(_elfSprite); Characters.Add(_paladinSprite); Characters.Add(_dwarfSprite); foreach (var t in Characters) { t.Initialize(this, _graphics); } AnimationTemp = new AnimationSprite(this, new AnimationDefinition(), 0) { Direction = new Vector2(0, 0), Position = new Vector2(10, 10) }; base.Initialize(); }
public override void Initialize(Game game, GraphicsDeviceManager graphics) { CharacterSpeed = 5; CharacterFaction = "Evil"; FacingRight = true; CharacterWeapon.Range = 6; CharacterWeapon.WeaponName = "Bow"; AnimationIdleRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleRightSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 70 }, 2); AnimationIdleRightSprite.Initialize(graphics); AnimationIdleLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleLeftSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 70 }, 2); AnimationIdleLeftSprite.Initialize(graphics); AnimationIdleSelectedRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleSelectedRightSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 72 }, 2); AnimationIdleSelectedRightSprite.Initialize(graphics); AnimationIdleSelectedLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleSelectedLeftSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 72 }, 2); AnimationIdleSelectedLeftSprite.Initialize(graphics); AnimationIdleTargetableRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleTargetableRightSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 72 }, 2); AnimationIdleTargetableRightSprite.Initialize(graphics); AnimationIdleTargetableLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleTargetableLeftSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 72 }, 2); AnimationIdleTargetableLeftSprite.Initialize(graphics); AnimationIdleTargetableMouseOverRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleTargetableMouseOverRightSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 72 }, 2); AnimationIdleTargetableMouseOverRightSprite.Initialize(graphics); AnimationIdleTargetableMouseOverLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfIdleTargetableMouseOverLeftSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(7, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 72 }, 2); AnimationIdleTargetableMouseOverLeftSprite.Initialize(graphics); AnimationWalkRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfWalkRightSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 75 }, 2); AnimationWalkRightSprite.Initialize(graphics); AnimationWalkLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfWalkLeftSpriteSheet", FrameSize = new Point(61, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = true, FeetToHead = 75 }, 2); AnimationWalkLeftSprite.Initialize(graphics); AnimationStrikeDownLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfStrikeFrontLeftSpriteSheet", FrameSize = new Point(101, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = false, FeetToHead = 75, ReturnIdle = true }, 2); AnimationStrikeDownLeftSprite.Initialize(graphics); AnimationStrikeDownRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfStrikeFrontRightSpriteSheet", FrameSize = new Point(101, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = false, FeetToHead = 75, ReturnIdle = true }, 2); AnimationStrikeDownRightSprite.Initialize(graphics); AnimationStrikeFrontLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfStrikeFrontLeftSpriteSheet", FrameSize = new Point(101, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = false, FeetToHead = 75, ReturnIdle = true }, 2); AnimationStrikeFrontLeftSprite.Initialize(graphics); AnimationStrikeFrontRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfStrikeFrontRightSpriteSheet", FrameSize = new Point(101, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = false, FeetToHead = 75, ReturnIdle = true }, 2); AnimationStrikeFrontRightSprite.Initialize(graphics); AnimationStrikeUpLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfStrikeFrontLeftSpriteSheet", FrameSize = new Point(101, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = false, FeetToHead = 75, ReturnIdle = true }, 2); AnimationStrikeUpLeftSprite.Initialize(graphics); AnimationStrikeUpRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "ElfStrikeFrontRightSpriteSheet", FrameSize = new Point(101, 80), NbFrames = new Point(10, 1), FrameRate = 7, StartPosition = new Vector2(0, 0), Loop = false, FeetToHead = 75, ReturnIdle = true }, 2); AnimationStrikeUpRightSprite.Initialize(graphics); AnimationSprite = AnimationIdleRightSprite; }
public override void Initialize(Game game, GraphicsDeviceManager graphics) { CharacterSpeed = 3; CharacterFaction = "Good"; FacingRight = false; CharacterWeapon.Range = 2; CharacterWeapon.WeaponName = "Two Handed Sword"; AnimationIdleLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleLeftSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 75 }, 7); AnimationIdleLeftSprite.Initialize(graphics); AnimationIdleRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleRightSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 75 }, 7); AnimationIdleRightSprite.Initialize(graphics); AnimationIdleSelectedRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleSelectedRightSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 77 }, 7); AnimationIdleSelectedRightSprite.Initialize(graphics); AnimationIdleSelectedLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleSelectedLeftSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 77 }, 7); AnimationIdleSelectedLeftSprite.Initialize(graphics); AnimationIdleTargetableRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleTargetableRightSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 77 }, 7); AnimationIdleTargetableRightSprite.Initialize(graphics); AnimationIdleTargetableLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleTargetableLeftSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 77 }, 7); AnimationIdleTargetableLeftSprite.Initialize(graphics); AnimationIdleTargetableMouseOverRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleTargetableMouseOverRightSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 77 }, 7); AnimationIdleTargetableMouseOverRightSprite.Initialize(graphics); AnimationIdleTargetableMouseOverLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinIdleTargetableMouseOverLeftSpriteSheet", FrameSize = new Point(81, 125), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 77 }, 7); AnimationIdleTargetableMouseOverLeftSprite.Initialize(graphics); AnimationWalkLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinWalkLeftSpriteSheet", FrameSize = new Point(80, 125), NbFrames = new Point(8, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 75 }, 7); AnimationWalkLeftSprite.Initialize(graphics); AnimationWalkRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinWalkRightSpriteSheet", FrameSize = new Point(80, 125), NbFrames = new Point(8, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = true, FeetToHead = 75 }, 7); AnimationWalkRightSprite.Initialize(graphics); AnimationStrikeDownLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinStrikeDownLeftSpriteSheet", FrameSize = new Point(121, 125), NbFrames = new Point(4, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = false, FeetToHead = 75, ReturnIdle = true }, 7); AnimationStrikeDownLeftSprite.Initialize(graphics); AnimationStrikeDownRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinStrikeDownRightSpriteSheet", FrameSize = new Point(121, 125), NbFrames = new Point(4, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = false, FeetToHead = 75, ReturnIdle = true }, 7); AnimationStrikeDownRightSprite.Initialize(graphics); AnimationStrikeFrontLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinStrikeFrontLeftSpriteSheet", FrameSize = new Point(121, 125), NbFrames = new Point(4, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = false, FeetToHead = 75, ReturnIdle = true }, 7); AnimationStrikeFrontLeftSprite.Initialize(graphics); AnimationStrikeFrontRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinStrikeFrontRightSpriteSheet", FrameSize = new Point(121, 125), NbFrames = new Point(4, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = false, FeetToHead = 75, ReturnIdle = true }, 7); AnimationStrikeFrontRightSprite.Initialize(graphics); AnimationStrikeUpLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinStrikeUpLeftSpriteSheet", FrameSize = new Point(131, 125), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = false, FeetToHead = 75, ReturnIdle = true }, 7); AnimationStrikeUpLeftSprite.Initialize(graphics); AnimationStrikeUpRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "PaladinStrikeUpRightSpriteSheet", FrameSize = new Point(131, 125), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(15, 11), Loop = false, FeetToHead = 75, ReturnIdle = true }, 7); AnimationStrikeUpRightSprite.Initialize(graphics); AnimationSprite = AnimationIdleLeftSprite; }
public override void Initialize(Game game, GraphicsDeviceManager graphics) { CharacterSpeed = 2; CharacterFaction = "Evil"; FacingRight = true; CharacterWeapon.Range = 1; CharacterWeapon.WeaponName = "Axe"; AnimationIdleRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleRightSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 65 }, 18); AnimationIdleRightSprite.Initialize(graphics); AnimationIdleLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleLeftSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 65 }, 18); AnimationIdleLeftSprite.Initialize(graphics); AnimationIdleSelectedRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleSelectedRightSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 67 }, 18); AnimationIdleSelectedRightSprite.Initialize(graphics); AnimationIdleSelectedLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleSelectedLeftSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 67 }, 18); AnimationIdleSelectedLeftSprite.Initialize(graphics); AnimationIdleTargetableRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleTargetableRightSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 67 }, 18); AnimationIdleTargetableRightSprite.Initialize(graphics); AnimationIdleTargetableLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleTargetableLeftSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 67 }, 18); AnimationIdleTargetableLeftSprite.Initialize(graphics); AnimationIdleTargetableMouseOverRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleTargetableMouseOverRightSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 67 }, 18); AnimationIdleTargetableMouseOverRightSprite.Initialize(graphics); AnimationIdleTargetableMouseOverLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfIdleTargetableMouseOverLeftSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(6, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 67 }, 18); AnimationIdleTargetableMouseOverLeftSprite.Initialize(graphics); AnimationWalkRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfWalkRightSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(8, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 65 }, 18); AnimationWalkRightSprite.Initialize(graphics); AnimationWalkLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfWalkLeftSpriteSheet", FrameSize = new Point(61, 90), NbFrames = new Point(8, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = true, FeetToHead = 65 }, 18); AnimationWalkLeftSprite.Initialize(graphics); AnimationStrikeDownLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfStrikeDownLeftSpriteSheet", FrameSize = new Point(81, 90), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = false, FeetToHead = 65, ReturnIdle = true }, 18); AnimationStrikeDownLeftSprite.Initialize(graphics); AnimationStrikeDownRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfStrikeDownRightSpriteSheet", FrameSize = new Point(81, 90), NbFrames = new Point(11, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = false, FeetToHead = 65, ReturnIdle = true }, 18); AnimationStrikeDownRightSprite.Initialize(graphics); AnimationStrikeFrontLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfStrikeFrontLeftSpriteSheet", FrameSize = new Point(91, 90), NbFrames = new Point(9, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = false, FeetToHead = 65, ReturnIdle = true }, 18); AnimationStrikeFrontLeftSprite.Initialize(graphics); AnimationStrikeFrontRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfStrikeFrontRightSpriteSheet", FrameSize = new Point(91, 90), NbFrames = new Point(9, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = false, FeetToHead = 65, ReturnIdle = true }, 18); AnimationStrikeFrontRightSprite.Initialize(graphics); AnimationStrikeUpLeftSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfStrikeUpLeftSpriteSheet", FrameSize = new Point(91, 90), NbFrames = new Point(8, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = false, FeetToHead = 65, ReturnIdle = true }, 18); AnimationStrikeUpLeftSprite.Initialize(graphics); AnimationStrikeUpRightSprite = new AnimationSprite(game, new AnimationDefinition { AssetName = "DwarfStrikeUpRightSpriteSheet", FrameSize = new Point(91, 90), NbFrames = new Point(8, 1), FrameRate = 7, StartPosition = new Vector2(0, 11), Loop = false, FeetToHead = 65, ReturnIdle = true }, 18); AnimationStrikeUpRightSprite.Initialize(graphics); AnimationSprite = AnimationIdleRightSprite; }