I've got a function where I assign variables based on who is the initiator.
function is like this if it's the characters turn to attack Attack(true)
goes to this function
function Attack(bool CharacterAttacking){
var Attacker = Monster;
var Target = Character;
if (CharacterAttacking)
{
Attacker = Character;
Target = Monster;
}
monster is selected by default.
but if I want to switch it around so that the character is the attacker in my if
, then I get the error
Cannot implicitly convert type Game.Models.Monster to Game.Models.Character
How can I switch it around so that the attacker becomes the character and the target becomes the monster?
Thank you