DefaultEncyclopediaArticle.cs 902 B

123456789101112131415161718192021222324252627
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Sirenix.OdinInspector;
  5. [CreateAssetMenu(fileName = "Encyclopedia Article", menuName = "KairoEngine/Encyclopedia Article"), HideMonoScript]
  6. public class DefaultEncyclopediaArticle : ScriptableObject, IEncyclopediaArticle
  7. {
  8. public string title = "Example Article Title";
  9. public Sprite icon;
  10. public Sprite image;
  11. public string author;
  12. public string date;
  13. [HideLabel, TextArea()] public string text;
  14. public EncyclopediaArticle GetArticle()
  15. {
  16. var article = new EncyclopediaArticle();
  17. article.content.Add("title", title);
  18. article.content.Add("author", title);
  19. article.content.Add("date", title);
  20. article.content.Add("text", text);
  21. article.images.Add("icon", icon);
  22. article.images.Add("image", image);
  23. return article;
  24. }
  25. }