コード例 #1
0
    IEnumerator MovieSequence()
    {
        if (!movieIsPlaying)
        {
            movieIsPlaying = true;
            CamManager.Instance.mainCamEffects.CameraPan(new Vector3(-87.4f, 32f, -10f), "JumboMovie");

            dialogManager.textBox.SetActive(false);
            CamManager.Instance.mainCamPostProcessor.profile = null;//TODO: returns to NO effect, not sure if you want this, future Conor
            dialogManager.currentlySpeakingIcon.gameObject.SetActive(false);


            string filmToPlay = GetCurrentFilm();
            movieScreen.GetComponent <Ev_JumboFilmSFXHandler>().movieDarkness.SetActive(true);
            yield return(new WaitForSeconds(.5f));

            movieScreen.GetComponent <Ev_JumboFilmSFXHandler>().projectorLight.SetActive(true);
            SoundManager.instance.musicSource.volume       = 0;
            SoundManager.instance.backupMusicSource.volume = GlobalVariableManager.Instance.MASTER_MUSIC_VOL;
            SoundManager.instance.backupMusicSource.clip   = projectorPlay;
            SoundManager.instance.backupMusicSource.Play();

            yield return(new WaitForSeconds(2f));

            if (movieEnhancement == "color")
            {
                filmColor.SetActive(true);
                filmColor.GetComponent <tk2dSpriteAnimator>().Play(filmToPlay + "_Color");
            }
            movieScreen.GetComponent <tk2dSpriteAnimator>().Play(filmToPlay);

            DeleteCurrentFilm();

            //determine next film
            FriendEvent nextMovie = GenerateEvent();
            day              = GenerateNextFilmDay();
            nextMovie.day    = day;
            newestAddedEvent = nextMovie;

            movieIsPlaying = false;
            if (nextDialog == "Start")
            {
                StartCoroutine("AfterFirstMovie");
            }
            else
            {
                yield return(new WaitForSeconds(10f));               //10= length of each movie

                SoundManager.instance.backupMusicSource.Stop();
                SoundManager.instance.musicSource.volume = GlobalVariableManager.Instance.MASTER_MUSIC_VOL / 2;

                movieScreen.GetComponent <Ev_JumboFilmSFXHandler>().movieDarkness.SetActive(false);
                movieScreen.GetComponent <Ev_JumboFilmSFXHandler>().projectorLight.SetActive(false);
                dialogManager.Invoke("ReturnFromAction", .1f);
            }
        }
    }
コード例 #2
0
    public GameObject AddIcon(FriendEvent fEvent)
    {
        GameObject newIcon = ObjectPool.Instance.GetPooledObject("calendarIcon", gameObject.transform.position);

        newIcon.GetComponent <SpriteRenderer>().sprite = fEvent.friend.calendarIcon;
        newIcon.transform.parent = this.transform;
        myIcons.Add(newIcon);
        return(newIcon);
    }
コード例 #3
0
    public void NewMarkSequence(int day, FriendEvent fEvent)
    {
        newMarkSequence = true;


        GameObject icon = daySquares[day].AddIcon(fEvent);

        selectableIcons.Add(icon);

        SoundManager.instance.PlaySingle(calendaMarkSfx);
    }
コード例 #4
0
    public void GenerateEvents()
    {
        CalendarManager.Instance.ClearFriendEvents();
        for (int i = 0; i < friends.Count; ++i)
        {
            FriendEvent the_event = friends[i].GenerateEvent();

            if (the_event != null)
            {
                CalendarManager.Instance.AddFriendEvent(the_event);
            }
        }
    }
コード例 #5
0
    // virtual function to generate an event for this friend so it can be added to the calendar.  Let the friend can decide when they want to show up.
    public virtual FriendEvent GenerateEvent()
    {
        var the_event = new FriendEvent();

        GenerateEventData();
        IsVisiting       = false;
        the_event.friend = this;
        the_event.day    = day;


        Debug.Log("New Friend Event Generated:\n" +
                  "Friend: " + the_event.friend.name + "\n" +
                  "Day: " + the_event.day);

        return(the_event);
    }
コード例 #6
0
    public void AddFriendEvent(FriendEvent friendEvent)
    {
        if (friendEvent.friend == null)
        {
            Debug.Log("No Friend defined for Friend Event!");
            return;
        }

        if (friendEvent.day < 0 || friendEvent.day > maxDays)
        {
            Debug.Log("Day is out of range for Friend Event!");
            return;
        }

        friendEvents.Add(friendEvent);
    }
コード例 #7
0
ファイル: MissionWindow.cs プロジェクト: wuxin0602/Nothing
 private void OnFriendHandler(FriendEvent e)
 {
     MissionModelLocator.Instance.FriendsMsg = e.RaidFriend;
     SetFriendList(MissionModelLocator.Instance.FriendsMsg);
 }
コード例 #8
0
 public void NewActiveQuestsMark(FriendEvent fEvent)
 {
 }