void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.image = ((System.Windows.Controls.Image)(target)); return; case 2: this.textBox = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.characterImage = ((WPFBattle.CharacterImage)(target)); return; case 4: this.characterImage1 = ((WPFBattle.CharacterImage)(target)); return; case 5: this.characterImage2 = ((WPFBattle.CharacterImage)(target)); return; case 6: this.characterImage3 = ((WPFBattle.CharacterImage)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.textbox = ((System.Windows.Controls.TextBox)(target)); #line 23 "..\..\MainWindow.xaml" this.textbox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged); #line default #line hidden return; case 2: this.Player1Image = ((WPFBattle.CharacterImage)(target)); return; case 3: this.Player2Image = ((WPFBattle.CharacterImage)(target)); return; case 4: this.Player3Image = ((WPFBattle.CharacterImage)(target)); return; case 5: this.Player4Image = ((WPFBattle.CharacterImage)(target)); return; } this._contentLoaded = true; }
public void Attack(ICharacter attacker, ICharacter defender, CharacterImage image) { image.characterState = CharacterImage.CharacterState.Attacking; //Set character image to attacking Thread.Sleep(300); //pause characters state base.Attack(attacker, defender); image.characterState = CharacterImage.CharacterState.Idle; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TextBox = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.mageImage = ((WPFBattle.CharacterImage)(target)); return; case 3: this.warriorImage = ((WPFBattle.CharacterImage)(target)); return; case 4: this.computerWizardImage = ((WPFBattle.CharacterImage)(target)); return; case 5: this.archerImage = ((WPFBattle.CharacterImage)(target)); return; } this._contentLoaded = true; }
public void Attack(ICharacter attacker, ICharacter defender, CharacterImage image) { image.State = CharacterImage.CharacterState.Attacking; System.Console.WriteLine("Attacking"); Thread.Sleep(200); base.Attack(attacker, defender); image.State = CharacterImage.CharacterState.Idle; }
public submissiveMage(string name, CharacterImage cImage) { this.CharacterClass = "Mage"; this.Name = name; this.Image = cImage; this.attackBehavior = new sFireAttack(); this.Health = GameConstants.Instance.PlayerHitpoints; }
public submissiveComputerWizard(string name, CharacterImage cImage) { this.CharacterClass = "ComputerWizard"; this.Name = name; this.Image = cImage; this.attackBehavior = new sBadGradeAttack(); this.Health = GameConstants.Instance.PlayerHitpoints; }
public Archer(string name, CharacterImage cImage) { this.CharacterClass = "LongBowMan (Archer)"; this.Name = name; this.Image = cImage; this.attackBehavior = new zBowAttack(); this.Health = GameConstants.Instance.PlayerHitpoints; }
public ImageComputerWizard(string name, int health, CharacterImage image) { this.CharacterClass = "Computer Wizard"; this.attackBehavior = new ImageBadGradeAttack(image); this.Name = name; this.Health = health; this.image = image; image.State = CharacterImage.CharacterState.Idle; }
public ArcherView(string name, int health, CharacterImage frame) //Create based on name, health, and image frame { this.CharacterClass = "Archer"; //Fighters class this.attackBehavior = new DisplaySwordAttack(frame); //class Attack this.Name = name; //Characters name this.Health = health; //Characters health this.image = frame; //Character Image frame image.characterState = CharacterImage.CharacterState.Idle; //Set image to idle }
public ImageMage(string name, int health, CharacterImage image) { this.CharacterClass = "Mage"; this.attackBehavior = new ImageFireAttack(image); this.Name = name; this.Health = health; this.image = image; image.State = CharacterImage.CharacterState.Idle; }
public ComputerWizardView(string name, int health, CharacterImage frame) { this.CharacterClass = "ComputerWizard"; //Fighters class this.attackBehavior = new DisplaySwordAttack(frame); //class Attack this.Name = name; //Characters name this.Health = health; //Characters health this.image = frame; //Character image frame image.characterState = CharacterImage.CharacterState.Idle; //Start with charater in image idle }
public submissiveWarrior(string name, CharacterImage cImage) { this.CharacterClass = "Warrior"; this.Name = name; this.Health = GameConstants.Instance.PlayerHitpoints; this.Image = cImage; this.attackBehavior = new sSwordAttack(); }
public WarriorView(string name, int health, CharacterImage frame) { this.CharacterClass = "Warrior"; //Fighters class this.attackBehavior = new DisplaySwordAttack(frame); //class Attack this.Name = name; //Characters name this.Health = health; //Characters health this.image = frame; image.characterState = CharacterImage.CharacterState.Idle; }
public ImageWarrior(string name, int health, CharacterImage image) { this.CharacterClass = "Warrior"; this.attackBehavior = new ImageSwordAttack(image); this.Name = name; this.Health = health; this.image = image; image.State = CharacterImage.CharacterState.Idle; }
public ImageBowAttack(CharacterImage image) { this.image = image; }
public DisplayFireAttack(CharacterImage image) { this.image = image; }
public ArcherHero(CharacterImage characterImage) { this.characterImage = characterImage; this.attackBehavior = new BowAttack2(characterImage); }
public ComputerWizardHero(CharacterImage characterImage) { this.characterImage = characterImage; this.attackBehavior = new BadGradeAttack2(characterImage); }
public BadGradeAttack2(CharacterImage characterImage) { this.characterImage = characterImage; }
public ImageSwordAttack(CharacterImage image) { this.image = image; }
public ImageBadGradeAttack(CharacterImage image) { this.image = image; }
public BowAttack2(CharacterImage characterImage) { this.characterImage = characterImage; }
public DisplayBadGradeAttack(CharacterImage image) { this.image = image; }
public ImageFireAttack(CharacterImage image) { this.image = image; }
public SwordAttack2(CharacterImage characterImage) { this.characterImage = characterImage; }
public MageHero(CharacterImage characterImage) { this.characterImage = characterImage; this.attackBehavior = new FireAttack2(characterImage); }
public FireAttack2(CharacterImage characterImage) { this.characterImage = characterImage; }
public WarriorHero(CharacterImage characterImage) { this.characterImage = characterImage; this.attackBehavior = new SwordAttack2(characterImage); }
public DisplaySwordAttack(CharacterImage image) { this.image = image; }