Exemplo n.º 1
0
 public void Setup(Glyph glyph)
 {
     this.glyph = glyph;
     if (glyph.Category() == global::Glyph.Categories.motivation)
     {
         meshRenderer.material = Data.instance.MotivationMaterial();
     }
     else if (glyph.Category() == global::Glyph.Categories.situation)
     {
         meshRenderer.material = Data.instance.SituationMaterial();
     }
     else if (glyph.Category() == global::Glyph.Categories.place)
     {
         meshRenderer.material = Data.instance.PlaceMaterial();
     }
     else if (glyph.Category() == global::Glyph.Categories.item)
     {
         meshRenderer.material = Data.instance.ItemMaterial();
     }
     else if (glyph.Category() == global::Glyph.Categories.logic)
     {
         meshRenderer.material = Data.instance.LogicMaterial();
     }
     spriteRenderer.sprite = glyph.Sprite();
     spawnEffect.GetComponent <ParticleSystemRenderer>().material = meshRenderer.material;
     if (playableScript != null)
     {
         playableScript.LineRendererMaterial(meshRenderer.material);
     }
 }
Exemplo n.º 2
0
    private void OnCollisionEnter(Collision collision)
    {
        Icon       collidingIcon       = collision.gameObject.GetComponent <Icon>();
        SacredIcon collidingSacredIcon = collision.gameObject.GetComponent <SacredIcon>();

        if (collidingIcon != null)
        {
            Glyph collidingGlyph = collidingIcon.Glyph();
            if (collidingGlyph.Category() == Glyph.Categories.situation && episode == null)
            {
                Stage.instance.StartEpisode(this, collidingIcon);
            }
            if (episode != null)
            {
                episode.BindIcon(collidingIcon);
            }
        }
        if (collidingSacredIcon != null)
        {
            if (episode != null && collidingSacredIcon.Episode() == null)
            {
                episode.BindIcon(collidingSacredIcon);
            }
        }
    }
Exemplo n.º 3
0
    public void MouseOver(Icon icon)
    {
        Glyph glyph = icon.Glyph();

        glyphImage.enabled = true;
        string glyphCategory = "";

        if (selected == null)
        {
            glyphImage.sprite = icon.Glyph().Sprite();
            if (Data.instance.Language() == Data.Languages.english)
            {
                if (glyph.Category() == Glyph.Categories.motivation)
                {
                    glyphCategory = Data.instance.MotivationDescriptionEng();
                }
                else if (glyph.Category() == Glyph.Categories.situation)
                {
                    glyphCategory = Data.instance.SituationDescriptionEng();
                }
                else if (glyph.Category() == Glyph.Categories.place)
                {
                    glyphCategory = Data.instance.PlaceDescriptionEng();
                }
                playableLabel.SetText(glyph.NameEng() + "\n" + glyphCategory);
            }
            else if (Data.instance.Language() == Data.Languages.spanish)
            {
                if (glyph.Category() == Glyph.Categories.motivation)
                {
                    glyphCategory = Data.instance.MotivationDescriptionSpa();
                }
                else if (glyph.Category() == Glyph.Categories.situation)
                {
                    glyphCategory = Data.instance.SituationDescriptionSpa();
                }
                else if (glyph.Category() == Glyph.Categories.place)
                {
                    glyphCategory = Data.instance.PlaceDescriptionSpa();
                }
                playableLabel.SetText(glyph.NameSpa() + "\n" + glyphCategory);
            }
        }
    }