public void testBouncingLightDoesNotDestroyItselfAboveThresholdHeight() { BouncingLight light = kernel.Get <BouncingLight>(); step(); Assert.IsFalse(light.Obj.destroyed); }
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); }
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())); }