コード例 #1
0
ファイル: Core_Level01Info.cs プロジェクト: terryxym/SCRMG
    void Start()
    {
        //Find references
        toolbox = FindObjectOfType <Core_Toolbox>();
        if (toolbox == null)
        {
            Debug.LogError("toolbox not found!!!");
        }
        em          = toolbox.GetComponent <Core_EventManager>();
        gameManager = toolbox.GetComponent <Core_GameManager>();
        Transform respawnPointHolder = transform.
                                       GetComponentInChildren <Core_RespawnPointHolderTag>().transform;

        foreach (Transform child in respawnPointHolder)
        {
            respawnPoints.Add(child);
        }

        //Find globalVariableLibrary and get variables from it
        lib = toolbox.GetComponent <Core_GlobalVariableLibrary>();
        GetStats();

        //Send respawnPoint list to GameManager and broadcast NewSceneLoaded
        gameManager.SetRespawnPoints(respawnPoints);
        em.BroadcastNewSceneLoaded(mySceneIndex);
    }
コード例 #2
0
    void Start()
    {
        toolbox = FindObjectOfType <Core_Toolbox>();
        if (toolbox == null)
        {
            Debug.LogError("toolbox not found!!!");
        }
        em  = toolbox.GetComponent <Core_EventManager>();
        lib = toolbox.GetComponent <Core_GlobalVariableLibrary>();
        GetStats();

        em.BroadcastNewSceneLoaded(mySceneIndex);
    }