Example #1
0
    private void Start()
    {
        welcome.SetActive(true);
        source = GetComponent <AudioSource>();
        Object[]   tempList = Resources.FindObjectsOfTypeAll(typeof(GameObject));
        GameObject temp;

        Scene3.SetActive(false);
        miniGame.SetActive(false);

        cameraControl.SetActive(false);
        walkControl1.SetActive(true);
        walkControl2.SetActive(false);

        mainCamera.position += new Vector3(0f, 0.3f, 0f);

        foreach (Object obj in tempList)
        {
            if (obj is GameObject)
            {
                temp = (GameObject)obj;
                if (temp.tag == "AdultDukong" || temp.tag == "KidDukong")
                {
                    realList.Add(temp);
                }
                if (temp.name == "MissionCheck")
                {
                    mc = temp.GetComponent <MissionCheck>();
                }
            }
        }
    }
Example #2
0
    void Start()
    {
        Object[]   tempList = Resources.FindObjectsOfTypeAll(typeof(GameObject));
        GameObject temp;

        foreach (Object obj in tempList)
        {
            if (obj is GameObject)
            {
                temp = (GameObject)obj;
                if (temp.name == "MissionCheck")
                {
                    mc = temp.GetComponent <MissionCheck>();
                }
            }
        }
    }
    void Start()
    {
        source = GetComponent <AudioSource>();

        height = ARCamera.transform.position.y;

        Object[]   tempList = Resources.FindObjectsOfTypeAll(typeof(GameObject));
        GameObject temp;

        RenderSettings.skybox = skyNight;

        startTime = Time.time;

        Door.SetActive(false);
        source.PlayOneShot(doorAppear, 1f);
        StartCoroutine(Next());

        foreach (Object obj in tempList)
        {
            if (obj is GameObject)
            {
                temp = (GameObject)obj;
                if (temp.tag == "StreetLight")
                {
                    StreetLight.Add(temp);
                }
                if (temp.name == "MissionCheck")
                {
                    mc = temp.GetComponent <MissionCheck>();
                }
            }
        }

        for (int i = 0; i < 51; i++)
        {
            StreetLight[i].SetActive(true);
        }
        NightLight.SetActive(true);
        DayLight.SetActive(false);
    }