Ejemplo n.º 1
0
    void CollectFriend()
    {
        GameObject collectionObj = GameObject.Find("CollectionScript");

        if (collectionObj != null)
        {
            CityCollectionHandler collectHandler = collectionObj.GetComponent <CityCollectionHandler>();

            if (collectHandler != null)
            {
                collectHandler.CollectNewFriend();
            }
        }
    }