Esempio n. 1
0
 public ScanningLaser(TestableGameObject obj,
                      Box box,
                      [GameObjectBoundary] Sphere sphere,
                      IPhysics physics,
                      IRigidBody body,
                      ILayerMask layerMask) : base(obj)
 {
     this.physics                 = physics;
     this.sphere                  = sphere;
     body.useGravity              = false;
     sphere.collider.enabled      = false;
     box.Obj.transform.localScale = new UnityEngine.Vector3(10, 1, 1);
     sphere.body.isKinematic      = true;
     body.AddTorque(new UnityEngine.Vector3(0, 5, 0), UnityEngine.ForceMode.Impulse);
     mask = 1 << layerMask.NameToLayer("Default");
 }
Esempio n. 2
0
 public ScanningLaser(TestableGameObject obj,
                      Box box,
                      [GameObjectBoundary] Sphere sphere,
                      IPhysics physics,
                      IRigidBody body,
                      ILayerMask layerMask)
     : base(obj)
 {
     this.physics = physics;
     this.sphere = sphere;
     body.useGravity = false;
     sphere.collider.enabled = false;
     box.Obj.transform.localScale = new UnityEngine.Vector3(10, 1, 1);
     sphere.body.isKinematic = true;
     body.AddTorque(new UnityEngine.Vector3(0, 5, 0), UnityEngine.ForceMode.Impulse);
     mask = 1 << layerMask.NameToLayer("Default");
 }
Esempio n. 3
0
        public void testLayerMasksInterpreted()
        {
            ILayerMask layerMask = kernel.Get <ILayerMask>();

            Assert.AreEqual(0, layerMask.NameToLayer("Default"));
        }