public override EditorPrimitive clone() { var p = new SpherePrimitive(Control); p.mesh = mesh.clone(); p.mesh.AutoTransformEnable = true; p.originalRadius = originalRadius; p.Scale = Scale; p.UserProperties = UserProperties; p.Layer = Layer; return(p); }
private void Init() { Scales.Add(new TGCVector3(10, 10, 10)); Scales.Add(new TGCVector3(25, 25, 25)); Scales.Add(new TGCVector3(35, 35, 35)); Scales.Add(new TGCVector3(50, 50, 50)); var texture = TgcTexture.createTexture(MediaDir + @"\Textures\bubble.png"); BubbleTemplate = new TGCSphere(30, texture, new TGCVector3(0, 0, 0)) { AlphaBlendEnable = true }; BubbleTemplate.updateValues(); BubbleTemplate.Transform = TGCMatrix.Scaling(Scales[Random.Next(0, Scales.Count)]); for (int index = 1; index <= 200; index++) { Bubbles.Add(BubbleTemplate.clone()); BubblesAux.Add(BubbleTemplate.clone()); } }