Пример #1
0
    public IEnumerator onDownloadedGlyph(Glyph newGlyph)
    {
        // if doesnt contain glyph, create a new glyph sphere for it
        if (newGlyph != null)
        {
            bool contains = false;
            foreach (GlyphSphere sphere in glyphSpheres)
            {
                if (sphere.getGlyph().Equals(newGlyph))
                {
                    contains = true;
                    break;
                }
            }

            if (!contains)
            {
                GameObject  go     = Instantiate(glyphSpherePrefab);
                GlyphSphere sphere = go.GetComponent <GlyphSphere> ();
                sphere.setGlyph(newGlyph);
                glyphSpheres.Add(sphere);

                glyphSpheres.Add(sphere);
            }

            reevaluateGlyphUniverseByLocation();
        }

        yield return("Done");
    }
Пример #2
0
 private void loadOwnedGlyphSpheres()
 {
     foreach (OwnedGlyphEvent glyph in LoggedInUser.GetLoggedInUser().ownedGlyphs)
     {
         GameObject  go     = Instantiate(glyphSpherePrefab);
         GlyphSphere sphere = go.GetComponent <GlyphSphere> ();
         sphere.setGlyph(glyph.GetGlyph());
         glyphSpheres.Add(sphere);
     }
 }