Exemplo n.º 1
0
 private static Monster GenerateMonster(MonsterLevelParameters parameters, Element element)
 {
     if (element == Element.ARMOUR)
     {
         return(new ArmourMonster(Ability.NONE, parameters.Name, parameters.Health, parameters.Mana, parameters.Reward));
     }
     else
     {
         return(new ElementMonster(element, Ability.NONE, parameters.Name, parameters.Health, parameters.Mana, parameters.Reward));
     }
 }
Exemplo n.º 2
0
    private static Monster GenerateRandomMonster(MonsterLevelParameters parameters)
    {
        var elementArray = Enum.GetValues(typeof(Element));

        return(GenerateMonster(parameters, (Element)(elementArray.GetValue(_random.Next(elementArray.Length)))));
    }