mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[csharp] IHasRendererObject
This commit is contained in:
parent
aa32c1aefd
commit
f6a98b0f43
@ -34,7 +34,7 @@ namespace Spine {
|
||||
abstract public class Attachment {
|
||||
public string Name { get; private set; }
|
||||
|
||||
public Attachment (String name) {
|
||||
protected Attachment (string name) {
|
||||
if (name == null) throw new ArgumentNullException("name", "name cannot be null");
|
||||
Name = name;
|
||||
}
|
||||
@ -43,4 +43,8 @@ namespace Spine {
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IHasRendererObject {
|
||||
object RendererObject { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ using System;
|
||||
|
||||
namespace Spine {
|
||||
/// <summary>Attachment that displays a texture region using a mesh.</summary>
|
||||
public class MeshAttachment : VertexAttachment {
|
||||
public class MeshAttachment : VertexAttachment, IHasRendererObject {
|
||||
internal float regionOffsetX, regionOffsetY, regionWidth, regionHeight, regionOriginalWidth, regionOriginalHeight;
|
||||
private MeshAttachment parentMesh;
|
||||
internal float[] uvs, regionUVs;
|
||||
@ -53,7 +53,7 @@ namespace Spine {
|
||||
public float A { get { return a; } set { a = value; } }
|
||||
|
||||
public string Path { get; set; }
|
||||
public object RendererObject; //public Object RendererObject { get; set; }
|
||||
public object RendererObject { get; set; }
|
||||
public float RegionU { get; set; }
|
||||
public float RegionV { get; set; }
|
||||
public float RegionU2 { get; set; }
|
||||
|
||||
@ -32,7 +32,7 @@ using System;
|
||||
|
||||
namespace Spine {
|
||||
/// <summary>Attachment that displays a texture region.</summary>
|
||||
public class RegionAttachment : Attachment {
|
||||
public class RegionAttachment : Attachment, IHasRendererObject {
|
||||
public const int BLX = 0;
|
||||
public const int BLY = 1;
|
||||
public const int ULX = 2;
|
||||
@ -61,7 +61,7 @@ namespace Spine {
|
||||
public float A { get { return a; } set { a = value; } }
|
||||
|
||||
public string Path { get; set; }
|
||||
public object RendererObject; //public object RendererObject { get; set; }
|
||||
public object RendererObject { get; set; }
|
||||
public float RegionOffsetX { get { return regionOffsetX; } set { regionOffsetX = value; } }
|
||||
public float RegionOffsetY { get { return regionOffsetY; } set { regionOffsetY = value; } } // Pixels stripped from the bottom left, unrotated.
|
||||
public float RegionWidth { get { return regionWidth; } set { regionWidth = value; } }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user