mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 01:10:08 +00:00
3.0 - unitypackage
This commit is contained in:
23
Runtime/Internal/Attributes/ComponentHandlerAttribute.cs
Normal file
23
Runtime/Internal/Attributes/ComponentHandlerAttribute.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class ComponentHandlerAttribute : Attribute
|
||||
{
|
||||
public readonly Type handler;
|
||||
public readonly bool allowMultiple = true;
|
||||
|
||||
public ComponentHandlerAttribute(Type handler)
|
||||
{
|
||||
this.handler = handler;
|
||||
this.allowMultiple = true;
|
||||
}
|
||||
|
||||
public ComponentHandlerAttribute(Type handler, bool allowMultiple)
|
||||
{
|
||||
this.handler = handler;
|
||||
this.allowMultiple = allowMultiple;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 396f8e713effb49fa8757d45944e7d30
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
42
Runtime/Internal/Attributes/CoordOptionsAttribute.cs
Normal file
42
Runtime/Internal/Attributes/CoordOptionsAttribute.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class CoordOptionsAttribute : Attribute
|
||||
{
|
||||
public readonly Type type0;
|
||||
public readonly Type type1;
|
||||
public readonly Type type2;
|
||||
public readonly Type type3;
|
||||
|
||||
public CoordOptionsAttribute(Type coord)
|
||||
{
|
||||
type0 = coord;
|
||||
}
|
||||
public CoordOptionsAttribute(Type coord, Type coord2)
|
||||
{
|
||||
type0 = coord;
|
||||
type1 = coord2;
|
||||
}
|
||||
public CoordOptionsAttribute(Type coord, Type coord2, Type coord3)
|
||||
{
|
||||
type0 = coord;
|
||||
type1 = coord2;
|
||||
type2 = coord3;
|
||||
}
|
||||
public CoordOptionsAttribute(Type coord, Type coord2, Type coord3, Type coord4)
|
||||
{
|
||||
type0 = coord;
|
||||
type1 = coord2;
|
||||
type2 = coord3;
|
||||
type3 = coord4;
|
||||
}
|
||||
|
||||
public bool Contains<T>() where T : CoordSystem
|
||||
{
|
||||
var type = typeof(T);
|
||||
return (type == type0 || type == type1 || type == type2 || type == type3);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Internal/Attributes/CoordOptionsAttribute.cs.meta
Normal file
11
Runtime/Internal/Attributes/CoordOptionsAttribute.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c03247521a944507bcdb1bcfbbc6006
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Runtime/Internal/Attributes/DefaultAnimationAttribute.cs
Normal file
15
Runtime/Internal/Attributes/DefaultAnimationAttribute.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class DefaultAnimationAttribute : Attribute
|
||||
{
|
||||
public readonly AnimationType type;
|
||||
|
||||
public DefaultAnimationAttribute(AnimationType handler)
|
||||
{
|
||||
this.type = handler;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b25b7b1d8388945d4bf78e54f094470f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Runtime/Internal/Attributes/ListForAttribute.cs
Normal file
15
Runtime/Internal/Attributes/ListForAttribute.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
|
||||
public class ListFor : Attribute
|
||||
{
|
||||
public readonly Type type;
|
||||
|
||||
public ListFor(Type type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Internal/Attributes/ListForAttribute.cs.meta
Normal file
11
Runtime/Internal/Attributes/ListForAttribute.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34edd91ec3857490fa2f04c620e44299
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
12
Runtime/Internal/Attributes/ListForComponentAttribute.cs
Normal file
12
Runtime/Internal/Attributes/ListForComponentAttribute.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
|
||||
public sealed class ListForComponent : ListFor
|
||||
{
|
||||
public ListForComponent(Type type) : base(type)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 529bcbd6bb69b4aac905c44451077ca5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
12
Runtime/Internal/Attributes/ListForSerieAttribute.cs
Normal file
12
Runtime/Internal/Attributes/ListForSerieAttribute.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
|
||||
public sealed class ListForSerie : ListFor
|
||||
{
|
||||
public ListForSerie(Type type) : base(type)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Internal/Attributes/ListForSerieAttribute.cs.meta
Normal file
11
Runtime/Internal/Attributes/ListForSerieAttribute.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2723e22555ab04116892a8c7d5c75fbd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class RequireChartComponentAttribute : Attribute
|
||||
{
|
||||
public readonly Type type0;
|
||||
public readonly Type type1;
|
||||
public readonly Type type2;
|
||||
|
||||
public RequireChartComponentAttribute(Type requiredComponent)
|
||||
{
|
||||
type0 = requiredComponent;
|
||||
}
|
||||
public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2)
|
||||
{
|
||||
type0 = requiredComponent;
|
||||
type1 = requiredComponent2;
|
||||
}
|
||||
public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2, Type requiredComponent3)
|
||||
{
|
||||
type0 = requiredComponent;
|
||||
type1 = requiredComponent2;
|
||||
type2 = requiredComponent3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f27bf434cb8045a6b5d02930f8df479
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
49
Runtime/Internal/Attributes/SerieConvertAttribute.cs
Normal file
49
Runtime/Internal/Attributes/SerieConvertAttribute.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
/// <summary>
|
||||
/// What serie can convert to me
|
||||
/// </summary>
|
||||
public sealed class SerieConvertAttribute : Attribute
|
||||
{
|
||||
public readonly Type type0;
|
||||
public readonly Type type1;
|
||||
public readonly Type type2;
|
||||
public readonly Type type3;
|
||||
|
||||
public SerieConvertAttribute(Type serie)
|
||||
{
|
||||
type0 = serie;
|
||||
}
|
||||
public SerieConvertAttribute(Type serie, Type serie2)
|
||||
{
|
||||
type0 = serie;
|
||||
type1 = serie2;
|
||||
}
|
||||
public SerieConvertAttribute(Type serie, Type serie2, Type serie3)
|
||||
{
|
||||
type0 = serie;
|
||||
type1 = serie2;
|
||||
type2 = serie3;
|
||||
}
|
||||
public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)
|
||||
{
|
||||
type0 = serie;
|
||||
type1 = serie2;
|
||||
type2 = serie3;
|
||||
type3 = serie4;
|
||||
}
|
||||
|
||||
public bool Contains<T>() where T : Serie
|
||||
{
|
||||
return Contains(typeof(T));
|
||||
}
|
||||
|
||||
public bool Contains(Type type)
|
||||
{
|
||||
return (type == type0 || type == type1 || type == type2 || type == type3);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Internal/Attributes/SerieConvertAttribute.cs.meta
Normal file
11
Runtime/Internal/Attributes/SerieConvertAttribute.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74af4595d38cb43ca8f11348cc979137
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
74
Runtime/Internal/Attributes/SerieExtraComponentAttribute.cs
Normal file
74
Runtime/Internal/Attributes/SerieExtraComponentAttribute.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class SerieExtraComponentAttribute : Attribute
|
||||
{
|
||||
public readonly List<Type> types = new List<Type>();
|
||||
|
||||
public SerieExtraComponentAttribute()
|
||||
{
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1)
|
||||
{
|
||||
types.Add(type1);
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1, Type type2)
|
||||
{
|
||||
types.Add(type1);
|
||||
types.Add(type2);
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1, Type type2, Type type3)
|
||||
{
|
||||
types.Add(type1);
|
||||
types.Add(type2);
|
||||
types.Add(type3);
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)
|
||||
{
|
||||
types.Add(type1);
|
||||
types.Add(type2);
|
||||
types.Add(type3);
|
||||
types.Add(type4);
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)
|
||||
{
|
||||
types.Add(type1);
|
||||
types.Add(type2);
|
||||
types.Add(type3);
|
||||
types.Add(type4);
|
||||
types.Add(type5);
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)
|
||||
{
|
||||
types.Add(type1);
|
||||
types.Add(type2);
|
||||
types.Add(type3);
|
||||
types.Add(type4);
|
||||
types.Add(type5);
|
||||
types.Add(type6);
|
||||
}
|
||||
public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)
|
||||
{
|
||||
types.Add(type1);
|
||||
types.Add(type2);
|
||||
types.Add(type3);
|
||||
types.Add(type4);
|
||||
types.Add(type5);
|
||||
types.Add(type6);
|
||||
types.Add(type7);
|
||||
}
|
||||
|
||||
public bool Contains<T>() where T : ISerieExtraComponent
|
||||
{
|
||||
return Contains(typeof(T));
|
||||
}
|
||||
|
||||
public bool Contains(Type type)
|
||||
{
|
||||
return types.Contains(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d61861a0f45f43af8915ae23cc326e9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
23
Runtime/Internal/Attributes/SerieHandlerAttribute.cs
Normal file
23
Runtime/Internal/Attributes/SerieHandlerAttribute.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class SerieHandlerAttribute : Attribute
|
||||
{
|
||||
public readonly Type handler;
|
||||
public readonly bool allowMultiple = true;
|
||||
|
||||
|
||||
public SerieHandlerAttribute(Type handler)
|
||||
{
|
||||
this.handler = handler;
|
||||
this.allowMultiple = true;
|
||||
}
|
||||
public SerieHandlerAttribute(Type handler, bool allowMultiple)
|
||||
{
|
||||
this.handler = handler;
|
||||
this.allowMultiple = allowMultiple;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Internal/Attributes/SerieHandlerAttribute.cs.meta
Normal file
11
Runtime/Internal/Attributes/SerieHandlerAttribute.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 810e22da460074d639f56dd860d9f5d1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user