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); }
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); }
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; }
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; }
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; }
//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; }
//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; }