30 lines
917 B
C#
30 lines
917 B
C#
using System;
|
|
using RPGCore.Core.Objects;
|
|
|
|
namespace RPGCore.ObjectModules.EventObjectModule
|
|
{
|
|
/// <summary>
|
|
/// Extend this to create new type of data for <<typeparamref name="T"/>> type of object.<br/>
|
|
/// To retrieve this data from <<typeparamref name="T"/>> object use <see cref="DataModule.Get{T}"/>.
|
|
/// </summary>
|
|
/// <typeparam name="T"><see cref="BaseObject"/> (or any of its children) that this event can be attached to.</typeparam>
|
|
[Serializable]
|
|
public abstract class BaseData<T> : BaseData where T : BaseObject
|
|
{
|
|
public new T parent => (T)base.parent;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <b>DO NOT EXTEND THIS</b>, use <see cref="BaseData{T}"/> instead!
|
|
/// </summary>
|
|
[Serializable]
|
|
public abstract class BaseData
|
|
{
|
|
internal BaseObject parent;
|
|
|
|
private protected BaseData()
|
|
{
|
|
|
|
}
|
|
}
|
|
} |