using System;
using System.Collections.Generic;
using System.Text;
using Yanesdk.Draw;

namespace Kyojin.Model
{
    /// <summary>
    /// シナリオ情報を表すクラス
    /// </summary>
    [Serializable]
    public class ScenarioInfo
    {
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public ScenarioInfo()
        {
            charaPos.Capacity = presetPos.Capacity = charaIds.Capacity = charaColors.Capacity = KyojinConst.CHARA_CONTAINER_SIZE;
        }

        /// <summary>
        /// シナリオ番号
        /// </summary>
        private KyojinConst.ScenarioID scenarioID;

        public KyojinConst.ScenarioID ScenarioID
        {
            get { return scenarioID; }
            set { scenarioID = value; }
        }
        /// <summary>
        /// シナリオの位置
        /// </summary>
        private int scenarioPos;

        public int ScenarioPos
        {
            get { return scenarioPos; }
            set { scenarioPos = value; }
        }
        /// <summary>
        /// ページ内での位置
        /// </summary>
        private int textPos;

        public int TextPos
        {
            get { return textPos; }
            set { textPos = value; }
        }
        /// <summary>
        /// 解析済みタグの数
        /// </summary>
        private int analyzedTagNum;

        public int AnalyzedTagNum
        {
            get { return analyzedTagNum; }
            set { analyzedTagNum = value; }
        }
        /// <summary>
        /// ページ番号
        /// </summary>
        private int page;

        public int PageNo
        {
            get { return page; }
            set { page = value; }
        }
        /// <summary>
        /// 背景画像番号
        /// </summary>
        private int bgNo;

        public int BgNo
        {
            get { return bgNo; }
            set { bgNo = value; }
        }
        /// <summary>
        /// 古い背景画像番号
        /// </summary>
        private int bgNoOld;

        public int BgNoOld
        {
            get { return bgNoOld; }
            set { bgNoOld = value; }
        }
        /// <summary>
        /// BGM番号
        /// </summary>
        private int bgmNo = -1;

        public int BgmNo
        {
            get { return bgmNo; }
            set { bgmNo = value; }
        }
        /// <summary>
        /// BGMボリューム
        /// </summary>
        private float bgmVol;

        public float BgmVol
        {
            get { return bgmVol; }
            set { bgmVol = value; }
        }
        /// <summary>
        /// BGMのループフラグ
        /// </summary>
        private bool bgmLoop;

        public bool BgmLoop
        {
            get { return bgmLoop; }
            set { bgmLoop = value; }
        }
        /// <summary>
        /// 効果音の番号
        /// </summary>
        private int[] seNo;

        public int[] SeNo
        {
            get { return seNo; }
            set { seNo = value; }
        }
        /// <summary>
        /// 効果音のボリューム
        /// </summary>
        private float seVol;

        public float SeVol
        {
            get { return seVol; }
            set { seVol = value; }
        }
        /// <summary>
        /// 効果音のループ回数
        /// </summary>
        private int seLoop;

        public int SeLoop
        {
            get { return seLoop; }
            set { seLoop = value; }
        }
        /// <summary>
        /// キャラクター位置情報
        /// </summary>
        private List<int> charaPos = new List<int>();

        public List<int> CharaPos
        {
            get { return charaPos; }
            set { charaPos = value; }
        }
        /// <summary>
        /// キャラクタープリセット情報
        /// </summary>
        private readonly List<int> presetPos = new List<int>();

        public List<int> PresetPos
        {
            get { return presetPos; }
        }
        /// <summary>
        /// キャラクターのID
        /// </summary>
        private readonly List<string> charaIds = new List<string>();

        public List<string> CharaIds
        {
            get { return charaIds; }
        }
        /// <summary>
        /// キャラクターの色
        /// </summary>
        private readonly List<string> charaColors = new List<string>();

        public List<string> CharaColors
        {
            get { return charaColors; }
        }
    }

    /// <summary>
    /// 現在対象となっている栞の情報
    /// </summary>
    public class CurrentInfo
    {
        private ScenarioInfo scenarioInfo;
        /// <summary>
        /// シナリオ情報
        /// </summary>
        public ScenarioInfo ScenarioInfo
        {
            get { return scenarioInfo; }
            set { scenarioInfo = value; }
        }

        private string text;
        /// <summary>
        /// 栞表示用
        /// </summary>
        public string Text
        {
            get { return text; }
            set { text = value; }
        }

        private bool start = false;
        /// <summary>
        /// 先頭からか読むか
        /// </summary>
        public bool Start
        {
            get { return start; }
            set { start = value; }
        }

        private volatile Rect rc;
        /// <summary>
        /// 選択した画像の表示矩形（自由に使って）
        /// </summary>
        public Rect Rc
        {
            get { return rc; }
            set { rc = value; }
        }
    }


}
