Exemplo n.º 1
0
 /// <summary>
 /// アイテムを取得する
 /// </summary>
 /// <param name="itemId"></param>
 public void GetItem(string itemId)
 {
     CurrentGetItemList.Add(itemId);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Start
        /// </summary>
        void Start()
        {
            // よく使用するため、コントローラの参照をあらかじめ取得しておく
            _nazotokiAdvEngineController = UtageUtil.GetNazotokiAdvEngineController();
            _searchController            = SearchGroup.GetComponent <SearchController>();
            _mapController  = _mapGroup.GetComponent <MapController>();
            _quizController = _quizGroup.GetComponent <QuizController>();

            // 初期化
            _currentGetItemList = new List <string>();
            _completeHouseCount = 1;

            // TODO: 外部ファイルから読み込み
            _itemInfoList  = new List <ItemInfo>();
            _quizInfoList  = new List <QuizInfo>();
            _stageInfoList = new List <StageInfo>();
            _houseInfoList = new List <HouseInfo>();

            // アイテム情報を読み込む
            var item1 = new ItemInfo();

            item1.Id          = "item_sample_1";
            item1.Type        = ItemType.Equipment;
            item1.Name        = "ほげ";
            item1.Description = "アイテム説明1";
            item1.ThmFilePath = "Utage/Dialog/Inventory/ItemThumbnail/thm_sample_001";
            item1.OrgFilePath = "Utage/Dialog/ItemDetail/ItemOrg/org_sample_001";
            item1.SpThm       = Resources.Load <Sprite>(item1.ThmFilePath);
            item1.SpOrg       = Resources.Load <Sprite>(item1.OrgFilePath);
            ItemInfoList.Add(item1);

            var item2 = new ItemInfo();

            item2.Id          = "item_sample_2";
            item2.Type        = ItemType.Equipment;
            item2.Name        = "ふが";
            item2.Description = "アイテム説明2";
            item2.ThmFilePath = "Utage/Dialog/Inventory/ItemThumbnail/thm_sample_002";
            item2.OrgFilePath = "Utage/Dialog/ItemDetail/ItemOrg/org_sample_002";
            item2.SpThm       = Resources.Load <Sprite>(item2.ThmFilePath);
            item2.SpOrg       = Resources.Load <Sprite>(item2.OrgFilePath);
            ItemInfoList.Add(item2);

            var item3 = new ItemInfo();

            item3.Id          = "item_sample_3";
            item3.Type        = ItemType.UseRooms;
            item3.Name        = "ハゲ";
            item3.Description = "アイテム説明3";
            item3.ThmFilePath = "Utage/Dialog/Inventory/ItemThumbnail/thm_sample_003";
            item3.OrgFilePath = "Utage/Dialog/ItemDetail/ItemOrg/org_sample_003";
            item3.SpThm       = Resources.Load <Sprite>(item3.ThmFilePath);
            item3.SpOrg       = Resources.Load <Sprite>(item3.OrgFilePath);
            ItemInfoList.Add(item3);

            var item4 = new ItemInfo();

            item4.Id          = "item_sample_4";
            item4.Type        = ItemType.UseBossRoom;
            item4.Name        = "手紙";
            item4.Description = "直接届けられない想いを伝えるために……";
            item4.ThmFilePath = "Utage/Dialog/Inventory/ItemThumbnail/thm_sample_004";
            item4.OrgFilePath = "Utage/Dialog/ItemDetail/ItemOrg/org_sample_004";
            item4.SpThm       = Resources.Load <Sprite>(item4.ThmFilePath);
            item4.SpOrg       = Resources.Load <Sprite>(item4.OrgFilePath);
            ItemInfoList.Add(item4);

            CurrentGetItemList.Add(item1.Id);
            CurrentGetItemList.Add(item2.Id);

            var quizInfo1 = new QuizInfo()
            {
                Id                     = "quiz_sample_1",
                CorrectAnswer          = "興味",
                GetItemId              = "item_sample_4",
                BeforeScenarioLabel    = "Test1",
                EndScenarioLabel       = "Test2",
                HintScenarioLabelList  = new List <string>(),
                QuestionObjectFilePath = "Game/Prefab/Quiz/Question/SampleQuestion"
            };

            _quizInfoList.Add(quizInfo1);

            var quizInfo2 = new QuizInfo()
            {
                Id                     = "quiz_sample_2",
                CorrectAnswer          = "兵",
                GetItemId              = "item_sample_4",
                BeforeScenarioLabel    = "Test3",
                EndScenarioLabel       = "Test4",
                HintScenarioLabelList  = new List <string>(),
                QuestionObjectFilePath = "Game/Prefab/Quiz/Question/Sample2Question"
            };

            _quizInfoList.Add(quizInfo2);

            var houseInfo1 = new HouseInfo()
            {
                Id = "house_sample_1",
                BeforeScenarioLabel = "Test1",
                EndScenarioLabel    = "Test2",
                QuizId = "quiz_sample_1",
                HouseObjectFilePath = "Game/Prefab/Search/House/SampleHouse"
            };

            _houseInfoList.Add(houseInfo1);

            var houseInfo2 = new HouseInfo()
            {
                Id = "house_sample_2",
                BeforeScenarioLabel = "Test4",
                EndScenarioLabel    = "Test3",
                QuizId = "quiz_sample_2",
                HouseObjectFilePath = "Game/Prefab/Search/House/Sample2House"
            };

            _houseInfoList.Add(houseInfo2);

            var stageInfo1 = new StageInfo()
            {
                Id = "stage_sample_1",
                StageObjectFilePath   = "Game/Prefab/Map/Stage/SampleStage",
                EpilogueScenarioLabel = "Test1",
                PrologueScenarioLabel = "プロローグ"
            };

            _stageInfoList.Add(stageInfo1);
            _currentStageInfo = stageInfo1;

            // 最初はシナリオシーン
            _currentScenarioLabel = stageInfo1.PrologueScenarioLabel;
            ChangeGameMode(GameMode.Senario);
        }