Exemplo n.º 1
0
 public void Achievement(Achievements.Achievement achievement)
 {
     Event("achievement", true, new Dictionary <string, object>
     {
         { "achievement_id", achievement.Id },
     });
 }
Exemplo n.º 2
0
    public bool Show(Achievements.Achievement achievement)
    {
        if (isShow)
        {
            return(false);
        }

        isShow = true;

        descriptionText.text = achievement.getText;
        medal = Medal.Create(medalParent, achievement);

        rectTransform.anchoredPosition = hidePosition;
        gameObject.SetActive(true);

        StartCoroutine(Showing());

        return(true);
    }
Exemplo n.º 3
0
    public static Medal Create(Transform parent, Achievements.Achievement achievement)
    {
        Medal medal = Instantiate(factory.medalPrefab) as Medal;

        medal.transform.SetParent(parent, false);

        medal.achievement      = achievement;
        medal.iconImage.sprite = achievement.icon;
        medal.mainImage.sprite = factory.medalSprites[achievement.rank];
        if (medal.iconOutline != null)
        {
            medal.iconOutline.effectColor = factory.medalColors[achievement.rank];
        }

        if (medal.hideImage != null)
        {
            medal.hideImage.sprite     = medal.mainImage.sprite;
            medal.hideImage.fillAmount = 1f - medal.achievement.progress;
        }

        return(medal);
    }