Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using UnityEngine;
using System.Collections;
using TapjoyUnity;
public class Tapjoy1 : MonoBehaviour {
int count = 0;
TJPlacement p;
// Use this for initialization
void Start () {
Tapjoy.OnConnectSuccess += HandleOnConnectSuccess;
}
void HandleOnConnectSuccess ()
{
TJPlacement.OnContentReady += HandleOnContentReady;
p = TJPlacement.CreatePlacement("offerwall_unit");
p.RequestContent();
count = 1;
}
void HandleOnContentReady (TJPlacement placement)
{
placement.ShowContent();
count = 600;
}
// Update is called once per frame
void Update () {
if (count > 0) {
count--;
Debug.Log ("count: " + count);
if (count <= 0) {
count = 0;
//TJPlacement.DismissContent();
//System.GC.Collect();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.