Exemple #1
0
        public static FieldObjectEntity setupInventory(FieldObjectEntity entity)
        {
            //Debug.Log("entity.id: " + entity.id);
            //Debug.Log("entity.inventory_size: " + entity.inventory_size);

            FieldObjectService.setupInventory(entity.id, entity.inventory_size);
            if (entity.inventory_size < 1)
            {
                return(entity);
            }

            var equip = EquipFactory.createRandomEntity();

            FieldObjectService.setInventory(entity.id, equip);
            return(entity);
        }
Exemple #2
0
    public void applySceneChangeTitle()
    {
        Debug.Log("MessageBroker.Default.Publish<SceneChangeSingle>()");
        Time.timeScale = 0f;

        MessageBroker.Default.Publish <SceneChangeSimple>(new SceneChangeSimple {
            add_scene = "Title",
            del_scene = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name,

            pre_action = () => {
                // GUI表示をタイトル画面に切り替え
                GuiService.modeChange(GuiState.Title);

                // 設定画面表示を消去
                toggle_settings_dialog();

                // NextRoomを消去
                EffectService.nextRoomClear();

                // 地面に落ちてる装備品を削除
                EquipService.ClearTarget();
                EquipService.destroyEquipItem();

                // 装備品リストをクリア
                EquipService.clear();

                // 家具配置範囲再初期化
                EffectiveFloorService.reset();

                // 家具再初期化
                FieldObjectService.clear();

                // 敵削除
                EnemyService.destroyEnemyDead();
                EnemyService.destroyEnemy();
                EnemyService.stopSpawn();
            },

            post_action = () => {
                Time.timeScale = 1f;
            }
        });
    }