playtomic/gameapi-unity3d — pull request #2 by oddgames (2013-09-01 11:01:52+00:00)
Title: Major changes to workflow using generics for GameVars, Leaderboards, Achievements etc

Added Option classes for filtering and listing to improve intellisense when using List commands.

Uses generics so you can create your own class that inherits from GameVar and receive either GameVar or your inherited class and start using the object (just how PlayerScore works).

You can do this to grab a standard "GameVar" that just has .name and .value as properties or you use a key GameVar[x] to grab the other values.

Playtomic.GameVars.Load("testvar1",HandleHandleActioncallback);

Void HandleHandleActioncallback (GameVar arg1, PResponse arg2)
{
Debug.Log (arg1.value);
}

Or create your own class with additional properties:

Playtomic.GameVars.Load("myVar",HandleHandleActioncallback);

Void HandleHandleActioncallback(GameVarWithMoreFields arg1, PResponse arg2)
{
Debug.Log (arg1.myfield);
}