I'm coding a game in XNA and I have two subclasses (Character and Enemy). I wanted to create a method that would lower an enemy's health by the character attack score. How would I do that? I'm having issues with having classes interact with each other.
Would it be possible to do something similar to a constructor, where I could type in something like:
Attack(player.attack, enemy.health);
And if the player's attack score was 2, and the enemies health was 10, after invoking the method the enemy would have 8 health left.