Beispiel #1
0
    void Awake()
    {
        //make sure we only have one object with this Gamedonia script at any time
        if (_instance != null)
        {
            Destroy(gameObject);
            return;
        }

        _instance     = this;
        notifications = new List <Dictionary <string, object> >();
        DontDestroyOnLoad(this);

                #if UNITY_EDITOR
                #elif UNITY_IOS
        if ((notificationType & RemoteNotificationType.Badge) != 0 && clearBadgeOnActivate)
        {
            ClearBadge();
        }
                #endif


        GDService service = new GDService();
        service.ProfileEvent += new ProfilerEventHandler(Profile);
        GamedoniaDevices.services.Add(service);

        GamedoniaDevices.GetProfile(OnGetProfile);
    }
Beispiel #2
0
    public bool IsDeviceRegisterNeeded()
    {
        GamedoniaPushNotifications   pushScript  = this.GetComponent <GamedoniaPushNotifications>();
        GamedoniaStoreInAppPurchases inappScript = this.GetComponent <GamedoniaStoreInAppPurchases>();

        return(pushScript != null || inappScript != null);
    }
Beispiel #3
0
    void Start()
    {
        GamedoniaUsers.Authenticate(OnLogin);
        printToConsole("Starting session with Gamedonia...");

        //Handle push
        GDPushService pushService = new GDPushService();

        pushService.RegisterEvent += new RegisterEventHandler(OnNotification);
        GamedoniaPushNotifications.AddService(pushService);
    }
Beispiel #4
0
    void Start()
    {
        //setting framerate
        QualitySettings.vSyncCount  = 0;
        Application.targetFrameRate = 30;

        // Load Managers
        Loader.I.Load();
        MatchManager.I.Load();
        PlayerManager.I.Load();
        AchievementManager.I.Load();
        // Push notifications
        GDPushService service = new GDPushService();

        service.RegisterEvent += new RegisterEventHandler(OnGameUpdateNotification);
        GamedoniaPushNotifications.AddService(service);
    }