コード例 #1
0
        /// <summary>
        /// Clone this shape.
        /// </summary>
        /// <returns>A deep copy of this object.</returns>
        public override object Clone()
        {
            Pyramid copy = new Pyramid(ID, Position, Scale, Rotation);

            OnClone(copy);
            return(copy);
        }
コード例 #2
0
        static void CreateShapes(Ids ids, List <Shapes.Shape> shapes, List <Resource> resources, string[] args)
        {
            int initialShapeCount = shapes.Count;

            Pyramid pyramid = new Pyramid(ids.NextShapeId++, new Vector3(-2, 0, 0), new Vector3(1, 1, 1), Quaternion.Identity);

            shapes.Add(pyramid);
        }
コード例 #3
0
 protected override Shapes.Shape CreateSerialisationShape(Handlers.ShapeComponent shapeComponent)
 {
     Shapes.Shape shape = new Pyramid();
     ConfigureShape(shape, shapeComponent);
     return(shape);
 }