FriendOfAttribute.cs 574 B

12345678910111213141516171819
  1. using System;
  2. namespace ET
  3. {
  4. /// <summary>
  5. /// 数据修改友好标记, 用于允许修改指定Component或Child数据的类上
  6. /// 例如:MoveComponentSystem需要修改MoveComponent的数据, 需要在MoveComponentSystem加上[FriendOf(typeof(MoveComponent))]
  7. /// </summary>
  8. [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
  9. public class FriendOfAttribute : Attribute
  10. {
  11. public Type Type;
  12. public FriendOfAttribute(Type type)
  13. {
  14. this.Type = type;
  15. }
  16. }
  17. }