示例#1
0
        internal static TargetingData Clone(TargetingData td)
        {
            var newTD = (TargetingData)td.MemberwiseClone();

            newTD.Source = TargetingProfile.Clone(td.Source);
            newTD.Target = TargetingProfile.Clone(td.Target);

            return(newTD);
        }
        internal static TargetingProfile Clone(TargetingProfile source)
        {
            TargetingProfile newP = (TargetingProfile)source.MemberwiseClone();

            // Preserve reference properties if present
            newP.FormationActor = source.FormationActor;
            newP.UnitActor      = source.UnitActor;

            return(newP);
        }