Esempio n. 1
0
        public void Physics_Element_Can_Be_Retrieved_When_It_Is_Present()
        {
            var primitive = new Primitive();
            var physics = new Physics();
            physics.Enabled = true;
            physics.Movable = true;
            physics.Weight = 1234;

            primitive.Add(physics);

            Assert.NotNull(primitive.GetPhysics());
            Assert.Equal(physics.Weight, primitive.GetPhysics().Weight);
        }
Esempio n. 2
0
        public void Interaction_Settings_Can_Be_Retrieved_From_A_Physics_Element()
        {
            var primitive = new Primitive();
            var physics = new Physics();

            var interaction = new Interaction();
            interaction.Element = Guid.NewGuid().ToString();

            physics.Add(interaction);
            primitive.Add(physics);

            Assert.NotEmpty(primitive.GetPhysics().GetInteractions());
            Assert.Equal(1, primitive.GetPhysics().GetInteractions().Count);
            Assert.Equal(interaction.Element, primitive.GetPhysics().GetInteractions().First().Element);
        }