diff --git a/Client/App.xaml.cs b/Client/App.xaml.cs index 2d09695..0afd92e 100644 --- a/Client/App.xaml.cs +++ b/Client/App.xaml.cs @@ -42,10 +42,14 @@ namespace Client .AddTransient(typeof(EntityFactoryInterface), typeof(EntityFactory)) .AddTransient(typeof(EntityFactoryInterface), typeof(EntityFactory)) + .AddTransient(typeof(EntityFactoryInterface), typeof(EntityFactory)) + .AddTransient(typeof(EntityFactoryInterface), typeof(EntityFactory)) .AddTransient(typeof(EntityFactoryInterface), typeof(EntityFactory)) .AddSingleton>() .AddSingleton>() + .AddSingleton>() + .AddSingleton>() .AddSingleton(); }) .Build(); diff --git a/Client/Domain/Entities/NPC.cs b/Client/Domain/Entities/NPC.cs new file mode 100644 index 0000000..2f68233 --- /dev/null +++ b/Client/Domain/Entities/NPC.cs @@ -0,0 +1,32 @@ +using Client.Domain.Enums; +using Client.Domain.ValueObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Client.Domain.Entities +{ + public class NPC : EntityInterface + { + public uint Id { get; set; } + public Transform Transform { get; set; } + public bool IsHostile { get; set; } + public uint NpcId { get; set; } + public SpoilStateEnum SpoilState { get; set; } + public FullName FullName { get; set; } + public VitalStats VitalStats { get; set; } + + public NPC(uint id, Transform transform, bool isHostile, uint npcId, SpoilStateEnum spoilState, FullName fullName, VitalStats vitalStats) + { + Id = id; + Transform = transform; + IsHostile = isHostile; + NpcId = npcId; + SpoilState = spoilState; + FullName = fullName; + VitalStats = vitalStats; + } + } +} diff --git a/Client/Domain/Entities/Player.cs b/Client/Domain/Entities/Player.cs new file mode 100644 index 0000000..1a91bbe --- /dev/null +++ b/Client/Domain/Entities/Player.cs @@ -0,0 +1,26 @@ +using Client.Domain.Enums; +using Client.Domain.ValueObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Client.Domain.Entities +{ + public class Player : EntityInterface + { + public uint Id { get; set; } + public Transform Transform { get; set; } + public FullName FullName { get; set; } + public Phenotype Phenotype { get; set; } + + public Player(uint id, Transform transform, FullName fullName, Phenotype phenotype) + { + Id = id; + Transform = transform; + FullName = fullName; + Phenotype = phenotype; + } + } +} diff --git a/Client/Domain/Enums/SpoilStateEnum.cs b/Client/Domain/Enums/SpoilStateEnum.cs new file mode 100644 index 0000000..8e21a2f --- /dev/null +++ b/Client/Domain/Enums/SpoilStateEnum.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Client.Domain.Enums +{ + public enum SpoilStateEnum + { + None, + Spoiled, + Sweepable + } +} diff --git a/Client/Infrastructure/Factories/EntityHandlerFactory.cs b/Client/Infrastructure/Factories/EntityHandlerFactory.cs index bbd58b7..718b854 100644 --- a/Client/Infrastructure/Factories/EntityHandlerFactory.cs +++ b/Client/Infrastructure/Factories/EntityHandlerFactory.cs @@ -27,6 +27,12 @@ namespace Client.Infrastructure.Factories case MessageTypeEnum.Drop: result = serviceProvider.GetService>(); break; + case MessageTypeEnum.NPC: + result = serviceProvider.GetService>(); + break; + case MessageTypeEnum.Player: + result = serviceProvider.GetService>(); + break; case MessageTypeEnum.Chat: result = serviceProvider.GetService(); break;