Compare commits
3 Commits
eb1b7ee688
...
650379e8f9
| Author | SHA1 | Date | |
|---|---|---|---|
| 650379e8f9 | |||
|
|
94bd4d1f05 | ||
| 0a3c20d687 |
@@ -5,7 +5,7 @@ namespace PeopleVille.Extension.Mod1;
|
||||
|
||||
public class Snake : IEquipment
|
||||
{
|
||||
|
||||
public string Name { get; set; } = "Snake";
|
||||
public void Equip()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -20,4 +20,24 @@ public class Snake : IEquipment
|
||||
{
|
||||
Console.WriteLine($"{person.Name} brugte en slange, lol");
|
||||
}
|
||||
}
|
||||
|
||||
public class Trumpet : IEquipment
|
||||
{
|
||||
public string Name { get; set; } = "Trumpet med 90 grader";
|
||||
|
||||
public void Equip()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Unequip()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Use(Person person)
|
||||
{
|
||||
Console.WriteLine($"{person.Name} brugte en trumpet, musik lyder i {person.CurrentLocation.Name}");
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,14 @@ namespace PeopleVille.Equipment
|
||||
|
||||
public void Use(Person target)
|
||||
{
|
||||
target.Health -= this.Damage;
|
||||
Console.WriteLine($"{target.Name} er blevet skudt og mistede {Damage} liv");
|
||||
try
|
||||
{
|
||||
target.Health -= this.Damage;
|
||||
Console.WriteLine($"{target.Name} er blevet skudt og mistede {Damage} liv");
|
||||
} catch
|
||||
{
|
||||
Console.WriteLine($"{target.Name} prøvede at skyde, men det virkede ikke, øv bøv");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using PeopleVille.Locations;
|
||||
|
||||
namespace PeopleVille
|
||||
{
|
||||
public class GameManager
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using PeopleVille.Equipment;
|
||||
|
||||
namespace PeopleVille.Locations
|
||||
{
|
||||
public class Store : Location
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace PeopleVille.Persons
|
||||
return;
|
||||
}
|
||||
|
||||
// 50/50 om vi gør noget eller ej
|
||||
if (RNG.ThrowDice(Dices.D3) == 1)
|
||||
return;
|
||||
switch (RNG.ThrowDice(Dices.D4))
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using PeopleVille.Equipment;
|
||||
using PeopleVille.Locations;
|
||||
using PeopleVille.Persons;
|
||||
using PeopleVille;
|
||||
using System.Reflection;
|
||||
namespace PeopleVille.WorldBuilder
|
||||
{
|
||||
@@ -110,9 +109,17 @@ namespace PeopleVille.WorldBuilder
|
||||
{
|
||||
var instances = new List<T>();
|
||||
string[] dlls = Directory.GetFiles(pathToAssemblyFolder, "*.dll");
|
||||
var baseAssemblyName = typeof(T).Assembly.GetName().Name;
|
||||
|
||||
foreach (var dll in dlls)
|
||||
{
|
||||
var assemblyName = AssemblyName.GetAssemblyName(dll).Name;
|
||||
|
||||
if (string.Equals(assemblyName, baseAssemblyName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
instances.AddRange(LoadTypesFromAssembly<T>(dll));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
### Benjamin
|
||||
- [x] Implementer dynamisk import af "eksterne" dll'er
|
||||
- [x] Find ud af hvordan tid skal fungere
|
||||
- [ ] Lav ny data så program kan køre
|
||||
- [x] Lav ny data så program kan køre
|
||||
### Mikkel
|
||||
- [x] Opret logik DoSomething()
|
||||
- [x] Personer skal kunne skifte lokation
|
||||
|
||||
Reference in New Issue
Block a user