private void HandleProgressEvent(ProgressEventInfo progressEventInfo) { if (progressEventInfo.progressEventType == PROGRESS_EVENT_TYPE.GAME_PROGRESS) { progress = progressEventInfo.progressIndex; APIHandler.getAPIHandler().UploadProgress(); } }
private static void ProgressEvent(ProgressEventInfo progressEventInfo) { if (!progressEventInfo.done) { progressEventInfo.done = true; switch (progressEventInfo.progressEventType) { case PROGRESS_EVENT_TYPE.ADD_TO_LOCATION: switch (progressEventInfo.AddRemoveType) { case ADD_REMOVE_TYPE.ACTION: progressEventInfo.location.hideActionsNr--; break; case ADD_REMOVE_TYPE.ENTITY: progressEventInfo.location.hideEntitiesNr--; break; case ADD_REMOVE_TYPE.LOCATION: progressEventInfo.location.hideLocationsNr--; break; } APIHandler.getAPIHandler().UploadEntityData(progressEventInfo.location.getUploadData()); break; case PROGRESS_EVENT_TYPE.REMOVE_FROM_LOCATION: switch (progressEventInfo.AddRemoveType) { case ADD_REMOVE_TYPE.ACTION: progressEventInfo.location.hideActionsNr++; break; case ADD_REMOVE_TYPE.ENTITY: progressEventInfo.location.hideEntitiesNr++; break; case ADD_REMOVE_TYPE.LOCATION: progressEventInfo.location.hideLocationsNr++; break; } APIHandler.getAPIHandler().UploadEntityData(progressEventInfo.location.getUploadData()); break; case PROGRESS_EVENT_TYPE.ADD_TO_INVENTORY: break; case PROGRESS_EVENT_TYPE.PROGRESS_DIALOGUE: progressEventInfo.entity.dialogueState++; APIHandler.getAPIHandler().UploadEntityData(progressEventInfo.entity.getUploadData()); break; case PROGRESS_EVENT_TYPE.PROGRESS_OPTIONS: progressEventInfo.options.hideOptions--; break; } } }
private static void LocationEvent(LocationEventInfo locationEventInfo) { Game.currentLocation = locationEventInfo.location; ProgressEventInfo e = ScriptableObject.CreateInstance <ProgressEventInfo>(); e.progressIndex = locationEventInfo.location.progressIndex; e.progressEventType = PROGRESS_EVENT_TYPE.GAME_PROGRESS; EventSystem.EventSystem.FireEvent(e); Show(locationEventInfo); AssignButtons(locationEventInfo); }