示例#1
0
    // Use this for initialization
    void Start()
    {
        GameObject ManagerInfo;

        ManagerInfo    = GameObject.Find("GameManager");
        ScoreInterface = ManagerInfo.GetComponent <Interface>();
    }
示例#2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            // GAME OVER

            other.gameObject.SetActive(false);
            GameObject ManagerInfo;
            ManagerInfo = GameObject.Find("GameManager");
            ManagerInfo.GetComponent <Interface>().PlayerDeath();
        }
    }