public new object Clone()
        {
            IActor actor = new Actor3D("clone - " + ID,                     //deep
                                       this.ActorType,                      //deep
                                       (Transform3D)this.transform.Clone(), //deep
                                       this.StatusType);                    //shallow

            //clone each of the (behavioural) controllers
            foreach (IController controller in this.ControllerList)
            {
                actor.AttachController((IController)controller.Clone());
            }

            return(actor);
        }
Example #2
0
        public override object GetDeepCopy()
        {
            IActor actor = new Actor3D("clone - " + ID,                     //deep
                                       this.ActorType,                      //deep
                                       (Transform3D)this.transform.Clone(), //deep
                                       this.StatusType);                    //shallow

            if (this.ControllerList != null)
            {
                //clone each of the (behavioural) controllers
                foreach (IController controller in this.ControllerList)
                {
                    actor.AttachController((IController)controller.Clone());
                }
            }

            return(actor);
        }