Exemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     dayBehaviour    = GetComponent <DayBehaviour>();
     peopleBehaviour = GetComponent <PeopleBehaviour>();
     foodPanel       = GameObject.Find("Food Panel");
     backgroundFade  = GameObject.FindGameObjectWithTag("Fade Background").GetComponent <Image>();
     backgroundFade.canvasRenderer.SetAlpha(0f);
     storyMaster = GetComponent <StoryMaster>();
 }
Exemplo n.º 2
0
    public void StartCutscene(int dayCounter, ref StoryMaster storyMaster)
    {
        List <GameObject> l = new List <GameObject>(spawnPlaces);

        foreach (GameObject citizen in GameObject.FindGameObjectsWithTag("Citizen"))
        {
            int rand = Random.Range(0, l.Count);
            print(rand);
            citizen.transform.position   = l[rand].transform.position;
            citizen.transform.localScale = new Vector3(2, 2, 0);
            citizen.GetComponent <CitizenBehaviour>().IsClickable = false;
            citizen.GetComponent <CitizenBehaviour>().UnhighlightInteractable();
            citizen.GetComponent <CitizenBehaviour>().HideInfo();
            l.RemoveAt(rand);
        }
        if (dayCounter < 6)
        {
            if (dayCounter == 1)
            {
                storyMaster.UpdateCurrentStory("Alone_by_bonfire");
            }
            if (dayCounter == 2)
            {
                storyMaster.UpdateCurrentStory("Day_two");
            }
            if (dayCounter == 3)
            {
                storyMaster.UpdateCurrentStory("Day_three");
            }
            if (dayCounter == 4)
            {
                storyMaster.UpdateCurrentStory("Day_four");
            }
            if (dayCounter == 5)
            {
                storyMaster.UpdateCurrentStory("Day_five");
            }
        }
        else
        {
            if (dayCounter == 6)
            {
                storyMaster.InkUseOrdered();
            }
            storyMaster.BasicSelectionBetweenScenes();
        }
    }