Esempio n. 1
0
    private void SetLink(float lookupID, HexObject objectScript)
    {
        GameObject go = QueryFindObjectByID((int)lookupID);

        if (go != null)
        {
            HexObject objScript = go.GetComponent <HexObject> ();
            if (objScript._Type == HexObject.eType.Main)
            {
                objectScript.AddLinkedObject(go);
            }
            else
            {
                objectScript.AddLinkedObject(_nullObj);
            }
        }
        else
        {
            objectScript.AddLinkedObject(_nullObj);
        }
    }