Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / item / weapon / RegisterWeaponOld.cs
  1. using System;
  2.  
  3. /// <summary>
  4. /// 用作 Weapon 子类上, 用于注册武器, 允许同时存在多个 RegisterWeapon 特性
  5. /// </summary>
  6. [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
  7. public class RegisterWeaponOld : Attribute
  8. {
  9. public string Id { get; private set; }
  10. public Type AttributeType { get; private set; }
  11.  
  12. public RegisterWeaponOld(string id)
  13. {
  14. Id = id;
  15. }
  16.  
  17. public RegisterWeaponOld(string id, Type attributeType)
  18. {
  19. Id = id;
  20. AttributeType = attributeType;
  21. }
  22. }