void Start()
    {
        GameObject container = GameObject.Find("BaseHealthStatusBar");

        Debug.Assert(container != null, "Could not find BaseHealthStatusBar GameObject");

        statusBar = container.GetComponentInChildren <StatusBarBehaviour> ();
        Debug.Assert(statusBar != null, "Could not find StatusBarBehaviour Component");

        statusBar.message = "Memory";
        life = maxLife;
    }
Ejemplo n.º 2
0
    void Start()
    {
        if (statusBar == null)
        {
            GameObject container = GameObject.Find("CurrencyStatusBar");
            Debug.Assert(container != null, "Could not find CurrencyStatusBar GameObject");

            statusBar = container.GetComponentInChildren <StatusBarBehaviour> ();
            Debug.Assert(statusBar != null, "Could not find StatusBarBehaviour Component");
        }
        UpdateStatus();
    }