Exemple #1
0
        public void IncludesEntityGroup()
        {
            var         component    = UseEffectHealComponent.Create(0);
            JsonElement deserialized = JsonSerializer.Deserialize <JsonElement>(component.Save());

            Assert.Equal(UseEffectHealComponent.ENTITY_GROUP, deserialized.GetProperty("EntityGroup").GetString());
        }
Exemple #2
0
        public void SerializesAndDeserializesCorrectly()
        {
            var    component = UseEffectHealComponent.Create(55);
            string saved     = component.Save();

            var newComponent = UseEffectHealComponent.Create(saved);

            Assert.Equal(component.Healpower, newComponent.Healpower);
        }
Exemple #3
0
        private static Entity CreateDuctTapeEntity()
        {
            var e = CreateEntity(Guid.NewGuid().ToString(), "duct tape");

            e.AddComponent(DisplayComponent.Create(_texDuctTapePath, "Some duct tape. Heals 10 HP.", true, ITEM_Z_INDEX));
            e.AddComponent(StorableComponent.Create());
            e.AddComponent(UsableComponent.Create(useOnGet: false));
            e.AddComponent(UseEffectHealComponent.Create(healpower: 10));

            return(e);
        }