Ejemplo n.º 1
0
        public Slice(ISliceable sliceable, IObject[] indexes)
        {
            this.sliceable = sliceable;
            this.indexes   = indexes;
            var original = (IObject)sliceable;

            collectionClass = (ICollectionClass)classOf(original);
        }
Ejemplo n.º 2
0
        void OnCollisionEnter(Collision other)
        {
            if (suppressUntilContactCeases.Contains(other.gameObject) == false)
            {
                ISliceable sliceable = other.gameObject.GetComponent(typeof(ISliceable)) as ISliceable;
                if (sliceable != null)
                {
                    Vector3 point = other.contacts[0].point;

                    pendingSlices.Enqueue(new PendingSlice(point, sliceable));
                }
            }
        }
Ejemplo n.º 3
0
        void OnTriggerEnter(Collider other)
        {
            if (suppressUntilContactCeases.Contains(other.gameObject) == false)
            {
                ISliceable sliceable = other.GetComponent(typeof(ISliceable)) as ISliceable;

                if (sliceable != null)
                {
                    Vector3 point = other.ClosestPointOnBounds(positionInWorldSpace);

                    pendingSlices.Enqueue(new PendingSlice(point, sliceable));
                }
            }
        }
Ejemplo n.º 4
0
        void OnTriggerEnter(Collider other)
        {
            if (suppressUntilContactCeases.Contains(other.gameObject) == false)
            {
                ISliceable sliceable = other.GetComponent(typeof(ISliceable)) as ISliceable;

                if (sliceable != null)
                {
                    //instantiatedBlood = Instantiate(blood,transform.position, Quaternion.Euler((transform.rotation.eulerAngles + new Vector3(90,0,0)))  );
                    print("entry");
                    Vector3 point = other.ClosestPointOnBounds(positionInWorldSpace);

                    pendingSlices.Enqueue(new PendingSlice(point, sliceable));
                }
            }
        }
Ejemplo n.º 5
0
 public ReadonlySlice(ISliceable <T> source, int start, int length)
 {
     this._source = source;
     this._start  = start;
     this.Length  = length;
 }
Ejemplo n.º 6
0
 public ReadonlySlice(ISliceable <T> source) : this(source, 0, source.Length)
 {
 }
Ejemplo n.º 7
0
 public ReadonlySlice(ISliceable <T> source, Index start, Index end)
 {
     this._source = source;
     this._start  = start.Resolve(source);
     this.Length  = end.Resolve(source) - this._start;
 }
Ejemplo n.º 8
0
 public ReadonlySlice(ISliceable <T> source, Range range) : this(source, range.Start, range.End)
 {
 }
Ejemplo n.º 9
0
 public PendingSlice(Vector3 _point, ISliceable _target)
 {
     point  = _point;
     target = _target;
 }
Ejemplo n.º 10
0
 public Slice(ISliceable <T> source) : this(source, 0, source.Length)
 {
 }
Ejemplo n.º 11
0
 public PendingSlice(Vector3 _point, ISliceable _target)
 {
     point = _point;
     target = _target;
 }