Buff.cs 538 B

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