using Cryville.Common;
using Cryville.Common.Pdt;
using System.Collections.Generic;
using UnityEngine;
namespace Cryville.Crtr.Components {
public abstract class SkinComponent : MonoBehaviour {
///
/// The property operators of the component.
///
public Dictionary Properties { get; private set; }
///
/// Submits a property.
///
/// The name of the property.
/// The property.
protected void SubmitProperty(string name, PdtOperator property, int uct = 1) {
Properties.Add(IdentifierManager.SharedInstance.Request(name), new SkinProperty(property, uct));
}
///
/// Creates a skin component.
///
protected SkinComponent() {
Properties = new Dictionary();
}
public virtual void Init() { }
protected abstract void OnDestroy();
}
public struct SkinProperty {
public PdtOperator Operator { get; set; }
public int UpdateCloneType { get; set; }
public SkinProperty(PdtOperator op, int uct = 1) {
Operator = op;
UpdateCloneType = uct;
}
}
}