Пример #1
0
 void OnTriggerEnter(Collider c)
 {
     if (onTrigger && c.tag == "Player")
     {
         SceneManaging.LoadScene(SceneID, ScenePart, SceneType);
     }
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        timer -= Time.deltaTime;

        if (timer <= 0)
        {
            SceneManaging.LoadScene(SceneID, ScenePart, SceneType);
        }
    }
Пример #3
0
    public static SceneManaging GetInstance()
    {
        if (!instance)
        {
            instance = (SceneManaging)FindObjectOfType(typeof(SceneManaging));
            if (!instance)
            {
                Debug.LogError("There needs to be one active SceneManaging script on a SceneManaging in your scene.");
            }
        }

        return(instance);
    }
Пример #4
0
    void Update()
    {
        clipLength -= Time.deltaTime;
        //when animation ends, load new scene
        if (clipLength < 0)
        {
            //fade out
            //---
            //

            SceneManaging.LoadScene(LoadSceneID, LoadScenePart, LoadSceneType);
        }
    }
Пример #5
0
    void OnTriggerEnter(Collider c)
    {
        if (c.tag == "Player")
        {
            PlayerPosition = c.gameObject.transform.position;

            switch (changeType)
            {
            case ROOMCHANGETYPE.In:
                SceneManaging.LoadScene(SceneID, ScenePart, SceneType);
                break;

            default:
                break;
            }
        }
    }
Пример #6
0
 // Start is called before the first frame update
 void Start()
 {
     CC = GameObject.FindGameObjectWithTag("Cursor").GetComponent <CursorController>();
     SM = GameObject.FindGameObjectWithTag("GameController").GetComponent <SceneManaging>();
     //Index = PlayerPrefs.GetInt("levelAt");
 }