Beispiel #1
0
        public new object Clone()
        {
            IActor actor = new Actor2D("clone - " + ID,                     //deep
                                       this.ActorType,                      //deep
                                       (Transform2D)this.transform.Clone(), //deep
                                       this.StatusType);                    //deep

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

            return(actor);
        }