Buff.cs 522 B

123456789101112131415161718192021222324
  1. using MongoDB.Bson.Serialization.Attributes;
  2. namespace Model
  3. {
  4. public class Buff: GameObject<Buff>
  5. {
  6. [BsonElement]
  7. private int configId { get; set; }
  8. public Buff(int configId)
  9. {
  10. this.configId = configId;
  11. }
  12. [BsonIgnore]
  13. public BuffConfig Config
  14. {
  15. get
  16. {
  17. return World.Instance.GetComponent<ConfigComponent>().Get<BuffConfig>(this.configId);
  18. }
  19. }
  20. }
  21. }