Ejemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="list">The hero state to construct.</param>
 public HeroState(HeroState field)
 {
     name           = field.name;
     visible        = field.visible;
     heroEvent      = new List <HeroEvent>(field.heroEvent.Select(x => x.Clone(x)));
     heroVisuals    = field.heroVisuals.Clone(field.heroVisuals);
     intConditions  = new List <ConditionIntFields>(field.intConditions.Select(x => x.Clone(x)));
     boolConditions = new List <ConditionBoolFields>(field.boolConditions.Select(x => x.Clone(x)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="list">The hero visuals to construct.</param>
 public HeroVisuals(HeroVisuals field)
 {
     visualType         = field.visualType;
     imageType          = field.imageType;
     rigidbodyType      = field.rigidbodyType;
     imageMesh          = field.imageMesh;
     prefab             = field.prefab;
     animator           = field.animator;
     animatorController = field.animatorController;
     avatar             = field.avatar;
     hasMesh            = field.hasMesh;
     hasAnimator        = field.hasAnimator;
     rigidbody          = field.rigidbody;
     rigidbody2D        = field.rigidbody2D;
 }
Ejemplo n.º 3
0
        // --------------------------------------------------------------
        // Methods
        // --------------------------------------------------------------

        /// <summary>
        /// Clone the hero visuals, remove references.
        /// </summary>
        /// <param name="field">The hero visuals to clone.</param>
        /// <returns>The cloned hero visuals.</returns>
        public HeroVisuals Clone(HeroVisuals field)
        {
            HeroVisuals temp = new HeroVisuals();

            temp.visualType         = field.visualType;
            temp.imageType          = field.imageType;
            temp.rigidbodyType      = field.rigidbodyType;
            temp.imageMesh          = field.imageMesh;
            temp.prefab             = field.prefab;
            temp.animator           = field.animator;
            temp.animatorController = field.animatorController;
            temp.avatar             = field.avatar;
            temp.hasMesh            = field.hasMesh;
            temp.hasAnimator        = field.hasAnimator;
            temp.rigidbody          = field.rigidbody;
            temp.rigidbody2D        = field.rigidbody2D;
            return(temp);
        }