public NPObject (NPObjectManager.eCollectionType _collectionType) { // Intialize properties m_instaceID = InstanceIDGenerator.Create(); // Register object NPObjectManager.AddNewObjectToCollection(this, _collectionType); }
protected void ReportScoreFinished(string _instanceID, IDictionary _dataDict) { Score _score = NPObjectManager.GetObjectWithInstanceID <Score>(_instanceID, NPObjectManager.eCollectionType.GAME_SERVICES); if (_score == null) { return; } // Invoke response handler _score.InvokeMethod(kScoreReportScoreFinished, new object[] { _dataDict }, new Type[] { typeof(IDictionary) }); }
protected void RequestForUserImageFinished(string _instanceID, IDictionary _dataDict) { User _user = NPObjectManager.GetObjectWithInstanceID <User>(_instanceID, NPObjectManager.eCollectionType.GAME_SERVICES); if (_user == null) { return; } // Invoke response handler _user.InvokeMethod(kUserRequestForImageFinished, new object[] { _dataDict }, new Type[] { typeof(IDictionary) }); }
protected void ReportProgressFinished(string _instanceID, IDictionary _dataDict) { Achievement _achievement = NPObjectManager.GetObjectWithInstanceID <Achievement>(_instanceID, NPObjectManager.eCollectionType.GAME_SERVICES); if (_achievement == null) { return; } // Invoke response handler _achievement.InvokeMethod(kAchievementReportProgressFinishedEvent, new object[] { _dataDict }, new Type[] { typeof(IDictionary) }); }
protected void RequestForAchievementImageFinished(string _instanceID, IDictionary _dataDict) { AchievementDescription _description = NPObjectManager.GetObjectWithInstanceID <AchievementDescription>(_instanceID, NPObjectManager.eCollectionType.GAME_SERVICES); if (_description == null) { return; } // Invoke response handler _description.InvokeMethod(kDescriptionRequestForImageFinishedEvent, new object[] { _dataDict }, new Type[] { typeof(IDictionary) }); }
protected void LoadScoresFinished(string _instanceID, IDictionary _dataDict) { Leaderboard _leaderboard = NPObjectManager.GetObjectWithInstanceID <Leaderboard>(_instanceID, NPObjectManager.eCollectionType.GAME_SERVICES); if (_leaderboard == null) { return; } // Invoke response handler _leaderboard.InvokeMethod(kLeaderboardLoadScoresFinishedEvent, new object[] { _dataDict }, new Type[] { typeof(IDictionary) }); }