//creates an enemy with 1 skill public Enemy(int att, int def, int con, int health, string n, Texture2D eS, Skill a) { enemyStats = new EnemyStatistics(att, def, con, health); Name = n; skillA = a; random = new Random(); whichAi = 2; isDead = false; enemySprite = eS; }
//also pass in array of textures (player dir movement) & an int (for which class //the player is?) - don't need anything the race public Player(int atk, int def, int con, Texture2D[]pS, int cI, string n, Skill a, Skill b) { playerStats = new PlayerStatistics(atk, def, con); playerSprites = pS; classIdentifier = cI; gold = 0; Name = n; skillA = a; skillB = b; isFainted = false; hasGone = false; }
public Player(int[]stats, Texture2D []partyMemberSprite, int cI, Skill a, Skill b) { playerSprites = partyMemberSprite; classIdentifier = cI; skillA = a; skillB = b; playerStats = new PlayerStatistics(stats[0], stats[1], stats[2]); if (cI == 1) Name = "WARRIOR"; else if (cI == 2) Name = "PSIONIC"; else Name = "SHOOTER"; }
private void ExecuteEnemyAction(Enemy e, GameTime gameTime) { lastMessageTime = gameTime.TotalGameTime; SetHealthReferencePoint(); if (e.GetEnemyStats().Health > 0) { SetHealthReferencePoint(); if (e.whichAi == 1) { e.ExecuteAI1(enemySelectedPlayer); AddMessage(e.Name + " attacked " + enemySelectedPlayer.Name + "!"); } else if (e.whichAi == 2) { chosenEnemySkill = e.ExecuteAI2(enemySelectedPlayer, e); if (chosenEnemySkill != null) { AddMessage(e.Name + " cast " + e.skillA.Name + "!"); } else { AddMessage(e.Name + " attacked " + enemySelectedPlayer.Name + "!"); } } else if (e.whichAi == 3) { chosenEnemySkill = e.ExecuteAI3(enemySelectedPlayer, e); AddMessage(e.Name + " cast " + chosenEnemySkill.Name + "!"); } DeterminePlayerMessages(enemySelectedPlayer); DetermineOtherMessages(enemySelectedPlayer); } }