public static Graphic_Linked WrapLinked(Graphic subGraphic, LinkDrawerType linkDrawerType)
        {
            Graphic_Linked result;

            switch (linkDrawerType)
            {
            case LinkDrawerType.None:
                result = null;
                break;

            case LinkDrawerType.Basic:
                result = new Graphic_Linked(subGraphic);
                break;

            case LinkDrawerType.CornerFiller:
                result = new Graphic_LinkedCornerFiller(subGraphic);
                break;

            case LinkDrawerType.Transmitter:
                result = new Graphic_LinkedTransmitter(subGraphic);
                break;

            case LinkDrawerType.TransmitterOverlay:
                result = new Graphic_LinkedTransmitterOverlay(subGraphic);
                break;

            default:
                throw new ArgumentException();
            }
            return(result);
        }
Beispiel #2
0
        public static AvaliGraphic_Linked WrapLinked(
            AvaliGraphic subGraphic,
            LinkDrawerType linkDrawerType)
        {
            switch (linkDrawerType)
            {
            case LinkDrawerType.None:
                return((AvaliGraphic_Linked)null);

            case LinkDrawerType.Basic:
                return(new AvaliGraphic_Linked(subGraphic));

            case LinkDrawerType.CornerFiller:
                return((AvaliGraphic_Linked) new AvaliGraphic_LinkedCornerFiller(subGraphic));

            case LinkDrawerType.Transmitter:
                return((AvaliGraphic_Linked) new AvaliGraphic_LinkedTransmitter(subGraphic));

            case LinkDrawerType.TransmitterOverlay:
                return((AvaliGraphic_Linked) new AvaliGraphic_LinkedTransmitterOverlay(subGraphic));

            default:
                throw new ArgumentException();
            }
        }
Beispiel #3
0
 public static Graphic_Linked WrapLinked(Graphic subGraphic, LinkDrawerType linkDrawerType)
 {
     return(linkDrawerType switch
     {
         LinkDrawerType.None => null,
         LinkDrawerType.Basic => new Graphic_Linked(subGraphic),
         LinkDrawerType.CornerFiller => new Graphic_LinkedCornerFiller(subGraphic),
         LinkDrawerType.Transmitter => new Graphic_LinkedTransmitter(subGraphic),
         LinkDrawerType.TransmitterOverlay => new Graphic_LinkedTransmitterOverlay(subGraphic),
         _ => throw new ArgumentException(),
     });
 public void CopyFrom(GraphicData other)
 {
     this.texPath      = other.texPath;
     this.graphicClass = other.graphicClass;
     this.shaderType   = other.shaderType;
     this.color        = other.color;
     this.colorTwo     = other.colorTwo;
     this.drawSize     = other.drawSize;
     this.onGroundRandomRotateAngle = other.onGroundRandomRotateAngle;
     this.drawRotated       = other.drawRotated;
     this.allowFlip         = other.allowFlip;
     this.flipExtraRotation = other.flipExtraRotation;
     this.shadowData        = other.shadowData;
     this.damageData        = other.damageData;
     this.linkType          = other.linkType;
     this.linkFlags         = other.linkFlags;
 }
Beispiel #5
0
 public void CopyFrom(GraphicData other)
 {
     texPath                   = other.texPath;
     graphicClass              = other.graphicClass;
     shaderType                = other.shaderType;
     color                     = other.color;
     colorTwo                  = other.colorTwo;
     drawSize                  = other.drawSize;
     drawOffset                = other.drawOffset;
     drawOffsetNorth           = other.drawOffsetNorth;
     drawOffsetEast            = other.drawOffsetEast;
     drawOffsetSouth           = other.drawOffsetSouth;
     drawOffsetWest            = other.drawOffsetSouth;
     onGroundRandomRotateAngle = other.onGroundRandomRotateAngle;
     drawRotated               = other.drawRotated;
     allowFlip                 = other.allowFlip;
     flipExtraRotation         = other.flipExtraRotation;
     shadowData                = other.shadowData;
     damageData                = other.damageData;
     linkType                  = other.linkType;
     linkFlags                 = other.linkFlags;
     cachedGraphic             = null;
 }
 public GraphicDataStats(GraphicData d)
 {
     this.texPath = d.texPath;
     //this.graphicClass = d.graphicClass;
     Util.AssignDefStat(d.shaderType, out this.shaderType);
     this.color    = new ColorStats(d.color);
     this.colorTwo = new ColorStats(d.colorTwo);
     this.drawSize = new Vector2Stats(d.drawSize);
     this.onGroundRandomRotateAngle = d.onGroundRandomRotateAngle;
     this.drawRotated       = d.drawRotated;
     this.allowFlip         = d.allowFlip;
     this.flipExtraRotation = d.flipExtraRotation;
     if (d.shadowData != null)
     {
         this.shadowData = new ShadowDataStats(d.shadowData);
     }
     if (d.damageData != null)
     {
         this.damageData = new DamageGraphicDataStats(d.damageData);
     }
     this.linkType  = d.linkType;
     this.linkFlags = d.linkFlags;
 }
Beispiel #7
0
 public void CopyFrom(AvaliGraphicData other)
 {
     this.texPath                   = other.texPath;
     this.graphicClass              = other.graphicClass;
     this.shaderType                = other.shaderType;
     this.color                     = other.color;
     this.colorTwo                  = other.colorTwo;
     this.colorThree                = other.colorThree;
     this.drawSize                  = other.drawSize;
     this.drawOffset                = other.drawOffset;
     this.drawOffsetNorth           = other.drawOffsetNorth;
     this.drawOffsetEast            = other.drawOffsetEast;
     this.drawOffsetSouth           = other.drawOffsetSouth;
     this.drawOffsetWest            = other.drawOffsetSouth;
     this.onGroundRandomRotateAngle = other.onGroundRandomRotateAngle;
     this.drawRotated               = other.drawRotated;
     this.allowFlip                 = other.allowFlip;
     this.flipExtraRotation         = other.flipExtraRotation;
     this.shadowData                = other.shadowData;
     this.damageData                = other.damageData;
     this.linkType                  = other.linkType;
     this.linkFlags                 = other.linkFlags;
     this.cachedGraphic             = (AvaliGraphic)null;
 }