/// <summary> /// Constructor. /// </summary> /// <param name="list">The hero action field to construct.</param> public HeroActionField(HeroActionField field) { name = field.name; id = field.id; ints = field.ints.Select(x => x).ToList(); floats = field.floats.Select(x => x).ToList(); strings = field.strings.Select(x => x).ToList(); bools = field.bools.Select(x => x).ToList(); gameObjects = field.gameObjects.Select(x => x).ToList(); heroObjects = field.heroObjects.Select(x => x).ToList(); unityObjects = field.unityObjects.Select(x => x).ToList(); colors = field.colors.Select(x => x).ToList(); heroProperties = field.heroProperties.Select(x => x).ToList(); method = field.method; component = null; }
/// <summary> /// Clone the hero action field, remove references. /// </summary> /// <param name="field">The hero action field to clone.</param> /// <returns>The cloned hero action field.</returns> public HeroActionField Clone(HeroActionField field) { HeroActionField temp = new HeroActionField(); temp.name = field.name; temp.id = field.id; temp.ints = field.ints.Select(x => x).ToList(); temp.floats = field.floats.Select(x => x).ToList(); temp.strings = field.strings.Select(x => x).ToList(); temp.bools = field.bools.Select(x => x).ToList(); temp.gameObjects = field.gameObjects.Select(x => x).ToList(); temp.heroObjects = field.heroObjects.Select(x => x).ToList(); temp.unityObjects = field.unityObjects.Select(x => x).ToList(); temp.colors = field.colors.Select(x => x).ToList(); temp.heroProperties = field.heroProperties.Select(x => x).ToList(); temp.method = field.method; temp.component = field.component; return(temp); }