private void CloneProperties(object aClone, Articy.Unity.ArticyObject aFirstClassParent) { Articy.Project_Of_Death.Features.taskFeature newClone = ((Articy.Project_Of_Death.Features.taskFeature)(aClone)); newClone.task_loyalty_counter = task_loyalty_counter; if ((mtask_death_target_first != null)) { newClone.mtask_death_target_first = ((ArticyValueArticyObject)(mtask_death_target_first.CloneObject(newClone, aFirstClassParent))); } if ((mtask_death_target_second != null)) { newClone.mtask_death_target_second = ((ArticyValueArticyObject)(mtask_death_target_second.CloneObject(newClone, aFirstClassParent))); } if ((mtask_spare_target_first != null)) { newClone.mtask_spare_target_first = ((ArticyValueArticyObject)(mtask_spare_target_first.CloneObject(newClone, aFirstClassParent))); } newClone.task_spare_occupation_selector = task_spare_occupation_selector; mtask_daily_profiles.CustomClone(newClone.mtask_daily_profiles); newClone.task_death_occupation_selector = task_death_occupation_selector; if ((task_profile_count != null)) { newClone.task_profile_count = ((ArticyScriptInstruction)(task_profile_count.CloneObject(newClone, aFirstClassParent))); } newClone.mLocaKey_task_description_top = mLocaKey_task_description_top; newClone.mOverwritten_task_description_top = mOverwritten_task_description_top; newClone.task_death_threshold_younger = task_death_threshold_younger; newClone.task_death_threshold_older = task_death_threshold_older; newClone.task_spare_threshold_younger = task_spare_threshold_younger; newClone.task_spare_threshold_older = task_spare_threshold_older; newClone.mLocaKey_task_description_bottom = mLocaKey_task_description_bottom; newClone.mOverwritten_task_description_bottom = mOverwritten_task_description_bottom; newClone.task_death_occupation_amount = task_death_occupation_amount; newClone.task_death_threshold_younger_amount = task_death_threshold_younger_amount; newClone.task_death_threshold_older_amount = task_death_threshold_older_amount; newClone.task_spare_occupation_amount = task_spare_occupation_amount; newClone.task_spare_threshold_younger_amount = task_spare_threshold_younger_amount; newClone.task_spare_threshold_older_amount = task_spare_threshold_older_amount; newClone.task_death_count = task_death_count; newClone.task_profile_shuffler = task_profile_shuffler; newClone.OwnerId = OwnerId; }
public object CloneObject(object aParent, Articy.Unity.ArticyObject aFirstClassParent) { Articy.Project_Of_Death.Features.taskFeature clone = new Articy.Project_Of_Death.Features.taskFeature(); CloneProperties(clone, aFirstClassParent); return(clone); }