Beispiel #1
0
        public RibbonTrail AddRibbonTrail(bool useFaceObj, Transform faceobj, float width, int maxelemnt, float len, Vector3 pos, float maxFps)
        {
            VertexSegment segment = GetVertices(maxelemnt * 2, (maxelemnt - 1) * 6);
            RibbonTrail   trail   = new RibbonTrail(segment, useFaceObj, faceobj, width, maxelemnt, len, pos, maxFps);

            return(trail);
        }
Beispiel #2
0
        public RibbonTrail AddRibbonTrail(Camera mainCam, bool useFaceObj, Transform faceobj, float width, int maxelemnt, float len, Vector3 pos, int stretchType, float maxFps, bool isWeapon, EffectNode owner, bool isScale)
        {
            VertexSegment segment = GetVertices(maxelemnt * 2, (maxelemnt - 1) * 6);
            RibbonTrail   trail   = new RibbonTrail(segment, mainCam, useFaceObj, faceobj, width, maxelemnt, len, pos, stretchType, maxFps, isWeapon, owner, isScale);

            return(trail);
        }
Beispiel #3
0
        public void SetLocalPosition(Vector3 pos)
        {
            //ribbon trail needs to reset the head.
            if (Type == ERenderType.Ribbon)
            {
                RibbonTrail rt = RenderObj as RibbonTrail;
                if (!SyncClient)
                {
                    rt.OriHeadPos = pos;
                }
                else
                {
                    rt.OriHeadPos = GetRealClientPos() + pos;
                }
            }

            Position = pos;
        }
Beispiel #4
0
        public void SetLocalPosition(Vector3 pos)
        {
            //ribbon trail needs to reset the head.
            if (Type == 1)
            {
                RibbonTrail rt = RenderObj as RibbonTrail;
                if (!SyncClient)
                {
                    rt.OriHeadPos = pos;
                }
                else
                {
                    rt.OriHeadPos = GetRealClientPos() + pos;
                }
            }

            // collison may get through. use dir to detect.
            //if (Owner.UseCollisionDetection && Owner.CollisionType != COLLITION_TYPE.CollisionLayer)
            //LastCollisionDetectDir = Vector3.zero;

            Position = pos;
        }
Beispiel #5
0
 public RibbonTrail AddRibbonTrail(bool useFaceObj, Transform faceobj,float width, int maxelemnt, float len, Vector3 pos, float maxFps)
 {
     VertexSegment segment = GetVertices(maxelemnt * 2, (maxelemnt - 1) * 6);
     RibbonTrail trail = new RibbonTrail(segment,useFaceObj,faceobj, width, maxelemnt, len, pos, maxFps);
     return trail;
 }
Beispiel #6
0
 //ribbon trail
 public void SetType(bool useFaceObj, Transform faceobj, float width, int maxelemnt, float len, Vector3 pos, int stretchType, float maxFps)
 {
     Type         = 2;
     Ribbon       = Owner.GetVertexPool().AddRibbonTrail(Owner.MyCamera, useFaceObj, faceobj, width, maxelemnt, len, pos, stretchType, maxFps);
     Ribbon.Owner = this;
 }
Beispiel #7
0
 //ribbon trail
 public void SetType(bool useFaceObj, Transform faceobj,float width, int maxelemnt, float len, Vector3 pos, int stretchType, float maxFps)
 {
     Type = 2;
     Ribbon = Owner.GetVertexPool().AddRibbonTrail(Owner.MyCamera, useFaceObj, faceobj, width, maxelemnt, len, pos, stretchType, maxFps);
     Ribbon.Owner = this;
 }