Files
crtr/Assets/Cryville/Crtr/Components/SkinComponent.cs
2022-09-30 18:19:19 +08:00

32 lines
893 B
C#

using Cryville.Common.Pdt;
using System.Collections.Generic;
using UnityEngine;
namespace Cryville.Crtr.Components {
public abstract class SkinComponent : MonoBehaviour {
/// <summary>
/// The property operators of the component.
/// </summary>
public Dictionary<string, PdtOperator> PropOps { get; private set; }
/// <summary>
/// Submits a property.
/// </summary>
/// <param name="name">The name of the property.</param>
/// <param name="property">The property operator.</param>
protected void SubmitProperty(string name, PdtOperator property) {
PropOps.Add(name, property);
}
/// <summary>
/// Create a skin component
/// </summary>
protected SkinComponent() {
// Properties = new Dictionary<string, Property>();
PropOps = new Dictionary<string, PdtOperator>();
}
public virtual void Init() { }
protected abstract void OnDestroy();
}
}