Sorry this image couldn't load for you. It's a nice one... I promise!

My first project with Graveck.

I helped with a lot of UI and UX code for the store and multiplayer flow in the game.

I also helped with the end of game UI for single player games and scoring.

Sorry this image couldn't load for you. It's a nice one... I promise!
Sorry this image couldn't load for you. It's a nice one... I promise! Sorry this image couldn't load for you. It's a nice one... I promise!
Here is some example functions from the Achievement Manager I wrote:

public void UnlockAchievement(string reference) {

#if UNITY_IPHONE
// not in editor and no GameCenter? No achievement for you!
if(!GameCenterBinding.isPlayerAuthenticated() && !Application.isEditor)
return;
#endif

// can't achieve while in tutorial
if(TutorialManager.Present)
return;

string ID = GetAchievementIDFromReference(reference);

// check if this achievement has already been completed
if (!GlobalData.Instance.debugAllowRepeatAchievements)
{
#if UNITY_IPHONE
// test if we already have the achievement (and, because GC is finicky, test partial ID)
string found = completedAchievements.Find((x) => {
return x.Contains(ID) || ID.Contains(x);
});

if (found != null)
return;
#elif UNITY_ANDROID // Checking PlayerPrefs, since we don't use GameCenter on Android
int found = PlayerPrefs.GetInt(ID, 0);

if(found != 0)
return;
#endif
}

Debug.Log("UnlockAchievement: " + reference + "(" + ID + ")");

#if UNITY_IPHONE
// and then report the achievement so GameCenter knows
completedAchievements.Add(ID);
// we do the data tracking so when the achievement is unlocked GameCenter will need it to just be 100% complete.
GameCenterBinding.reportAchievement(ID,100f);

#elif UNITY_ANDROID
PlayerPrefs.SetInt (ID,1);
#endif

// queue up and show the notification
queuedAchievementNotifications.Add(GetAchievementNameFromReference(reference));
PumpAchievementNotifications();

// analytics
System.Collections.Generic.Dictionary<string, string> context = new System.Collections.Generic.Dictionary<string, string>();
context.Add("Name", reference);
Analytics.LogEventWithParameters("Achievement Earned", context);
}
void OnGameOver() {

int points = ScoreManager.instance.Points;
// points
if(points >= 250)
UnlockAchievement("Rising");
if(points >= 350)
UnlockAchievement("Proficient");
if(points >= 450)
UnlockAchievement("Champion");
if(points >= 550)
UnlockAchievement("Amazing");
if(points >= 700)
UnlockAchievement("Virtuoso");
if(points >= 900)
UnlockAchievement("Hotshot");
if(points >= 1200)
UnlockAchievement("Ultimate");
if(points >= 1500)
UnlockAchievement("Godlike");
if(points >= 1800)
UnlockAchievement("BestScore");
}
void OnCheckForScoreAchievements(ArrayList holeScoreHistory) {
// here we will receive the ArrayList of scorehistory to check and see if we need to award achievements.

// every hole in the game
if(holeScoreHistory.Contains(10) && holeScoreHistory.Contains(20) && holeScoreHistory.Contains(30) && holeScoreHistory.Contains(40)
&& holeScoreHistory.Contains(50) && holeScoreHistory.Contains(100)) {
UnlockAchievement("EveryHole"); // fires
}

if(holeScoreHistory.Count == numBalls) { // this will only be checked at the end of the game
// all 20s
for(int i=0; i < numBalls; i++){ if((int)holeScoreHistory[i] != 20) break; if(i == (numBalls - 1)) UnlockAchievement("All20s"); } // all 50s for(int i=0; i < numBalls; i++){ if((int)holeScoreHistory[i] != 50) break; if(i == (numBalls - 1)) UnlockAchievement("All50s"); } // all 100s for(int i=0; i < numBalls; i++){ if((int)holeScoreHistory[i] != 100) break; if(i == (numBalls - 1)) UnlockAchievement("Perfect"); } // all zeros for(int i = 0; i < numBalls;++i){ if((int)holeScoreHistory[i] != 0) break; if(i == (numBalls-1)) UnlockAchievement("Fail"); // not in list "EPIC FAIL" } // all 100s except the last one bool cigar = true; for(int i = 0; i < numBalls;++i){ if (i == (numBalls - 1)) { if ((int)holeScoreHistory[i] != 100 && cigar) { UnlockAchievement("NoCigar"); } } else { if ((int)holeScoreHistory[i] != 100) { cigar = false; } } } } }