//void MediumUnlock()
 //{
 //    EliseLock.enabled = false;
 //    CanonLock.enabled = false;
 //}
 //void HardUnlock()
 //{
 //    EntertainLock.enabled = false;
 //}
 /// <summary>
 /// Updates the player's current difficulty state to /newDifficulty/.
 /// </summary>
 /// <param name="newDifficulty"></param>
 public void UnlockDifficulty( DifficultyState newDifficulty )
 {
     Debug.Log( "SongProgressionManagerScript.UnlockDifficulty(): Unlocked difficulty: " + newDifficulty.ToString() );
     CurrentDifficultyUnlocked = newDifficulty;
     //MediumUnlock();
     //HardUnlock();
 }
Example #2
0
    //void MediumUnlock()
    //{
    //    EliseLock.enabled = false;
    //    CanonLock.enabled = false;
    //}


    //void HardUnlock()
    //{
    //    EntertainLock.enabled = false;
    //}


    /// <summary>
    /// Updates the player's current difficulty state to /newDifficulty/.
    /// </summary>
    /// <param name="newDifficulty"></param>
    public void UnlockDifficulty(DifficultyState newDifficulty)
    {
        Debug.Log("SongProgressionManagerScript.UnlockDifficulty(): Unlocked difficulty: " + newDifficulty.ToString());
        CurrentDifficultyUnlocked = newDifficulty;
        //MediumUnlock();
        //HardUnlock();
    }
Example #3
0
    // Use this for initialization
    void Awake()
    {
        plr = GetComponentInChildren<Player>();
        plr.Setup(this);

        TUNING = Resources.Load("Scripts/Tuning") as DTTuning;

        Hours = gameObject.AddComponent<HoursManager>();
        Hours.Setup(this);

        remainingDay = TUNING.DaysComingBeforeSaveDay;

        pathDirector = GetComponentInChildren<WaypointDirector>();
        pathDirector.Setup(this);

        Dracu = GetComponentInChildren<Dracula>();
        Dracu.Setup(this);

        Diff = DifficultyState.BeforeLetter;

        PaperSpots = new List<GameObject>();
        GameObject pSpot = FETool.findWithinChildren(gameObject, "Spots/PaperSpot");
        Spot[] papSpot = pSpot.GetComponentsInChildren<Spot>();
        foreach (Spot obj in papSpot)
        {
            obj.spotType = Spot.spotList.Paper;
            PaperSpots.Add(obj.gameObject);
        }

        FoodSpots = new List<GameObject>();
        GameObject fSpot = FETool.findWithinChildren(gameObject, "Spots/FoodSpot");
        Spot[] fooSpot = fSpot.GetComponentsInChildren<Spot>();
        foreach (Spot obj in fooSpot)
        {
            obj.spotType = Spot.spotList.Food;
            FoodSpots.Add(obj.gameObject);
        }

        //		respawnPaper(PaperSpots);
        spawnFood(FoodSpots);
        saveDay = 1000;

        MailmanState = MailManStateList.Away;
        currCam = FETool.findWithinChildren(gameObject, "Camera").GetComponent<Camera>();
        GameUI = currCam.GetComponentInChildren<UI>();
        GameUI.Setup(this);

        GetComponentInChildren<MailManPlace>().Setup(this);
        bedList = GetComponentsInChildren<Bed>();

        Door[] Doors = GetComponentsInChildren<Door>();
        foreach (Door _dr in Doors)
        {
            _dr.Setup(this);
        }

        Waypoint[] Waypo = GetComponentsInChildren<Waypoint>();
        foreach (Waypoint _wp in Waypo)
        {
            wpList.Add(_wp);
        }

        GameEventManager.GameOver += GameOver;
        GameEventManager.Respawn += Respawn;
        GameEventManager.GameStart += GameStart;
        GameEventManager.EndGame += EndGame;

        MasterAudio.PlaySound("ambiance");

        //				GAMESTATE = GameEventManager.GameState.MainMenu;
        //				GameEventManager.TriggerRespawn("Rsp");
        GAMESTATE = GameEventManager.GameState.Live;
        GameEventManager.TriggerGameStart("First Init");
    }
Example #4
0
    public void triggerDayEvent(HoursManager.DayEventList _evt)
    {
        if (LevelManager.GAMESTATE == GameEventManager.GameState.Live)
        {
            switch (_evt)
            {
            case HoursManager.DayEventList.DraculaEntering :
            {
                GameUI.WillBackTxt.makeFadeOut();
                GameUI.discoverCharacter(PopUp.CharList.Dracula);
                MasterAudio.PlaySound("dracula_back");
                GameUI.NotifPop.giveInfos("Dracula is back\n from hunting");
                GameUI.dialogPop.giveInfos("Your blood look so tasty,\n come to me Johnathan.", PopUp.CharList.Dracula);
                new OTTween(GameUI.dialogPop.OutPic, 1f).Tween("alpha", 0f);
                break;
            }
            case HoursManager.DayEventList.DraculaLeaving :
            {
                GameUI.discoverCharacter(PopUp.CharList.Dracula);
                InvokeRepeating("laughPlz", 20f, 60f);
                GameUI.WillBackTxt.makeFadeIn();
                MasterAudio.PlaySound("dacrula_out");
                GameUI.NotifPop.giveInfos("Dracula has left \n the house");
                GameUI.dialogPop.giveInfos("I need some fresh blood...\n but I will be back. !", PopUp.CharList.Dracula);
                new OTTween(GameUI.dialogPop.OutPic, 1f).Tween("alpha", 1f);
                break;
            }
            case HoursManager.DayEventList.FoodMan :
            {
                resplenishFoods();
                GameUI.discoverCharacter(PopUp.CharList.Dracula);
                MasterAudio.PlaySound("eating_bell");
                GameUI.NotifPop.giveInfos("The Carrier has\n resplenished \nfood stocks");
                GameUI.dialogPop.giveInfos("I can now eat in the house's kitchens.\n If I don't eat, I'll die.", PopUp.CharList.Johnathan);
                break;
            }
            case HoursManager.DayEventList.MailManIn :
            {
                plr.displayBubbleInfo("think_post");
                MailmanState = MailManStateList.HasArrived;
                MasterAudio.PlaySound("door_bell");
                GameUI.discoverCharacter(PopUp.CharList.MailMan);
                GameUI.dialogPop.giveInfos("*Knock Knock*\n Hey it's the mail man.\n Is anybody here ?", PopUp.CharList.MailMan);
                GameUI.NotifPop.giveInfos("The mail man\n has arrived");
                break;
            }
            case HoursManager.DayEventList.MailManOut :
            {
                MailmanState = MailManStateList.Away;
                GameUI.discoverCharacter(PopUp.CharList.Dracula);
                GameUI.dialogPop.giveInfos("The mail man is gone now.\n I need to wait the next day for him.", PopUp.CharList.Johnathan);
                GameUI.NotifPop.giveInfos("The mail man\n is leaving");
                break;
            }
            case HoursManager.DayEventList.LetterSent :
            {
                Diff = DifficultyState.WaitingSave;
                saveDay = currD + TUNING.DaysComingBeforeSaveDay;
                GameUI.discoverCharacter(PopUp.CharList.Dracula);
                GameUI.Paper.frameName = "paper_sent";
                MailmanState = MailManStateList.Away;
                plr.haveLetter = Player.letterList.Sent;
                GameUI.dialogPop.giveInfos("I've asked Mina for some rescue \n against Dracula. I think they'll\n arrive within" + (saveDay - currD)  + " days.", PopUp.CharList.Johnathan);
                GameUI.NotifPop.giveInfos("The mail man\n is leaving\n with the letter");
                InvokeRepeating("recallObjective", 30f, 30f);
                break;
            }

            }
        }
    }
 void Start()
 {
     CurDifficultyState = DifficultyState.Easy;
     DontDestroyOnLoad(gameObject);
 }
 public void SetDifficulty(int difficulty)
 {
     CurDifficultyState = (DifficultyState)difficulty;
     SceneManager.LoadScene("NormalMode");
 }