// Copyright (c) Pixel Crushers. All rights reserved.
using UnityEngine;
using System.Collections.Generic;
namespace PixelCrushers.QuestMachine
{
///
/// A ScriptableObject that holds a list of quest assets.
///
//--- No [CreateAssetMenu]. Hide from asset menu; use wrapper class instead.
public class QuestDatabase : ScriptableObject
{
[Tooltip("This description field is for your internal reference. Not seen by the player.")]
[TextArea]
[SerializeField]
private string m_description;
[Tooltip("Quests to include in the database.")]
[SerializeField]
private List m_questAssets = new List();
[Tooltip("Images used by EntityType assets. Click 'Collect Images' automatically fill list this from a folder of EntityTypes.")]
[SerializeField]
private List m_images;
///
/// This description field is for your internal reference. Not seen by the player.
///
public string description
{
get { return m_description; }
set { m_description = value; }
}
///
/// Quest assets to include in the database.
///
public List questAssets { get { return m_questAssets; } }
///
/// Images used by EntityType assets. Click 'Collect Images' automatically fill list this from a folder of EntityTypes.
///
public List images
{
get { return m_images; }
set { m_images = value; }
}
///
/// Registers images with Quest Machine so procedural quests can reattach them when loading saved games.
///
public void RegisterImages()
{
for (int i = 0; i < images.Count; i++)
{
QuestMachine.RegisterImage(images[i]);
}
}
}
}