Пример #1
0
        public void testBouncingLightDoesNotDestroyItselfAboveThresholdHeight()
        {
            BouncingLight light = kernel.Get <BouncingLight>();

            step();
            Assert.IsFalse(light.Obj.destroyed);
        }
Пример #2
0
        public void testBouncingLightDestroysItselfBelowThresholdHeight()
        {
            BouncingLight light = kernel.Get <BouncingLight>();

            light.Obj.transform.Translate(new Vector3(0, BouncingLight.killThresholdY - 1, 0));
            step();
            Assert.IsTrue(light.Obj.destroyed);
        }
Пример #3
0
    private void onSpawn()
    {
        BouncingLight light = factory.create();

        light.Obj.transform.Translate(new UnityEngine.Vector3((float)rand.NextDouble(), 4 + (float)rand.NextDouble() * 10.0f, (float)rand.NextDouble()));
    }