public MessageProcessingResult Process(PropertyValueChangedMessage <GameEntity, Species> message, GameManager state)
            {
                Assert.Same(_testEntity, message.Entity);
                Assert.Equal(_testComponent.ComponentId, message.ChangedComponent?.ComponentId);
                Assert.Same(_testComponent, message.ChangedComponent);
                Assert.Equal(nameof(RaceComponent.Species), message.ChangedPropertyName);
                Assert.Equal(Species.Default, message.OldValue);
                Assert.Equal(Species.Dragon, message.NewValue);

                MessagesProcessed++;
                return(MessageProcessingResult.ContinueProcessing);
            }
Exemple #2
0
            public MessageProcessingResult Process(PropertyValueChangedMessage <GameEntity, string> message, GameManager state)
            {
                Assert.Same(_testEntity, message.Entity);
                Assert.Equal(_testComponent.ComponentId, message.ChangedComponent?.ComponentId);
                Assert.Same(_testComponent, message.ChangedComponent);
                Assert.Equal(nameof(EffectComponent.DurationAmount), message.ChangedPropertyName);
                Assert.Null(message.OldValue);
                Assert.Equal("10", message.NewValue);

                MessagesProcessed++;
                return(MessageProcessingResult.ContinueProcessing);
            }
Exemple #3
0
            public MessageProcessingResult Process(PropertyValueChangedMessage <GameEntity, int> message, GameManager state)
            {
                Assert.Same(_testEntity, message.Entity);
                Assert.Equal(_testComponent.ComponentId, message.ChangedComponent?.ComponentId);
                Assert.Same(_testComponent, message.ChangedComponent);
                Assert.Equal(nameof(BeingComponent.ColdResistance), message.ChangedPropertyName);
                Assert.Equal(0, message.OldValue);
                Assert.Equal(10, message.NewValue);

                MessagesProcessed++;
                return(MessageProcessingResult.ContinueProcessing);
            }