コード例 #1
0
ファイル: Enemy.cs プロジェクト: EricMeissner/BlackHoleLoans
 //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;
 }
コード例 #2
0
ファイル: Player.cs プロジェクト: briseno09/BlackHoleLoans
 //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;
 }
コード例 #3
0
ファイル: Player.cs プロジェクト: briseno09/BlackHoleLoans
        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";
        }
コード例 #4
0
ファイル: Combat.cs プロジェクト: EricMeissner/BlackHoleLoans
 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);
       }
 }