Beispiel #1
0
    /*
     * public void StopFootSteps()
     * {
     *  Debug.Log("스탑워킹");
     *  StopCoroutine(WalkingSound());
     * }
     */
    IEnumerator WalkingSound(float length)
    {
        Debug.Log("스타트워킹");

        AudioClip      clip = SFXFootStep[Random.Range(0, SFXFootStep.Length)];
        WaitForSeconds ws   = new WaitForSeconds(clip.length);
        float          time = 0f;

        while (time < length)
        {
            time += clip.length;
            SFXAudio.PlayOneShot(clip, SettingUIManager.GetInstance().GetSFXVolume());
            yield return(ws);
        }
    }
Beispiel #2
0
    public void LoadGame()  //저장했던 게임 시작.   저장 자료ㅗ구조 만들기.
    {
        SettingUIManager.GetInstance().PauseBtn.interactable = true;
        //저장을, 하루의 완전 종료 일때!
        //11일을 다하고 12일날 하다가 종료면
        //11일 마지막까지 저장이 된 후
        //이 로드를 불러올때는
        //이렇게 하루 시작만 하면 되게/.


        bool loadSuccess = SaveManager.GetInstance().LoadGame();

        if (loadSuccess == false)
        {
            Debug.LogError("저장 데이터가 존재하지 않음!");
            return;
        }

        StartCoroutine(LoadingScene("QuestRoom_1", StartNewMorning));
    }
Beispiel #3
0
    public void PlaySFX(E_SFX sfx)
    {
        AudioClip clip = null;

        AudioClip[] cliplist = null;
        switch (sfx)
        {
        case E_SFX.CLICK:
            cliplist = SFXClick;
            break;

        case E_SFX.SLIDE:
            cliplist = SFXSlide;
            break;

        case E_SFX.GROWL:
            cliplist = SFXGrowl;
            break;

        case E_SFX.FOOTSTEP:
            cliplist = SFXFootStep;
            break;

        case E_SFX.GOLD:
            cliplist = SFXGold;
            break;

        case E_SFX.INVENOPEN:
            cliplist = SFXInvenOpen;
            break;

        case E_SFX.UNDERTAKE:
            cliplist = SFXUndertake;
            break;
        }
        clip = cliplist[Random.Range(0, cliplist.Length)];

        SFXAudio.PlayOneShot(clip, SettingUIManager.GetInstance().GetSFXVolume());
    }
Beispiel #4
0
    public void NewStartGame()  //완전 새로운 게임 시작.
    {
        SaveManager.GetInstance().DeleteSavedGame();

        SettingUIManager.GetInstance().PauseBtn.interactable = true;
        Debug.Log("게임매니져 - 뉴스타트게임-");

        InGameTimeManager.GetInstance().SetMainTime(1, 1, 1, 1, 1);
        WholeMonsterRiskManager.GetInstance().Init();
        PhaseManager.GetInstance().InitForNewStart();
        GoldManager.GetInstance().SetGold(Constant.newStartGolds);
        QuestManager.GetInstance().QuestDic.Clear();
        Inventory.GetInstance().MobEvidenceInven.Clear();
        Inventory.GetInstance().WeaponInventory.Clear();
        GameEndJudgeManager.GetInstance().InitForNewStart();
        CharactorManager.GetInstance().InitForNewStart();
        TextManager.GetInstance().DistributedNames.Clear();

        //모킹/
        for (int i = 0; i < (int)E_Monster.MAX; i++)
        {
            for (int j = 0; j < (int)E_Evidence.MAX; j++)
            {
                Inventory.GetInstance().AddMobEvi(new QuestPerMob((E_Monster)i, (E_Evidence)j, 3));
            }
        }
        List <Weapon> temp = new List <Weapon>();
        Weapon        w    = WeaponInfoManager.GetInstance().CreateWeapon(E_Weapon.AXE);

        temp.Add(w);
        Inventory.GetInstance().AddWeaponsToInven(temp);

        //모킹종료


        StartCoroutine(LoadingScene("QuestRoom_1", StartNewMorning));
    }
 public void ShowSetting()
 {
     SettingUIManager.GetInstance().Show();
 }
Beispiel #6
0
 public void OnSettingBtnClick()
 {
     SettingUIManager.GetInstance().Show();
 }