public void AchievementUnlocked(CTAchievement achievement) { show = true; //this.enabled = true; achievementPopupVisible = true; achievementText = achievement.title; iTween.ValueTo(gameObject, iTween.Hash("from", achievementPopupClosed, "to", achievementPopupOpened, "onupdate", "AnimateAchievementPopup", "easetype", iTween.EaseType.easeOutBack, "time", 0.5f)); iTween.ValueTo(gameObject, iTween.Hash("from", achievementLabelClosed, "to", achievementLabelOpened, "onupdate", "AnimateAchievementLabel", "easetype", iTween.EaseType.easeOutBack, "time", 0.5f)); iTween.ValueTo(gameObject, iTween.Hash("from", 0, "to", 1, "onupdate", "AnimateAchievementAlpha", "easetype", iTween.EaseType.easeOutBack, "time", 0.5f)); // This part would probably not make sense, it's just to delay before hiding the poup iTween.ValueTo(gameObject, iTween.Hash("from", 0, "to", 0, "onupdate", "DelayAnimation", "oncomplete", "HideAchievementPopup", "time", 3f)); }
public void AddAchievement(CTAchievement achievement) { achievementQueue.Enqueue(achievement); }