private INode GetGoogleNodeByNameAndParent(INode parent, string name) { Console.WriteLine($"Getting google data for '{parent.Name}'"); INode result = null; Console.WriteLine($"Enumerating {parent.Children.Count()} children, looking for {name} folder"); foreach (var child in parent.Children) { Console.Write("."); if (child.Name == name) { var childData = GoogleManager.GetTree(child.Id); AddToCache(childData, parent.Id); Console.WriteLine(); Console.WriteLine($"{name} folder found"); result = childData; break; } } if (result == null) { throw new ApplicationException($"No folder named '{name}' found in Google Drive {parent.Name}"); } return(result); }
// 퀘스트 로드 void QuestLoad(SavedGameRequestStatus status, ISavedGameMetadata game) { if (status == SavedGameRequestStatus.Success) { GoogleManager.SavedGame().ReadBinaryData(game, LoadQuestData); } }
public JsonResult GetContent(string Name) { GoogleManager mng = new GoogleManager(); mng.Authentications(); string[] res = mng.DownloadContentFile(Name); return(Json(res, JsonRequestBehavior.AllowGet)); }
void Start() { imgInfoObj = buildingInfoPanelObj.transform.GetChild(0).transform.GetChild(2).gameObject; txtNoticeObj.SetActive(false); googleManager = GameObject.FindObjectOfType <GoogleManager>(); }
void Awake() { Instance = this; isInitialized = false; DontDestroyOnLoad(this); }
void Start() { uiManager = GameObject.FindObjectOfType <UIManager>(); optionManager = GameObject.FindObjectOfType <OptionManager>(); googleManager = GameObject.FindObjectOfType <GoogleManager>(); StartCoroutine(SetTime()); StartCoroutine(AutoSave()); }
void Awake() { instance = this; if (loggin == false) { GoogleManager.instance.loggin = true; OnLogin(); } }
public JsonResult DeletFiles(string name) { GoogleManager mng = new GoogleManager(); mng.Authentications(); bool res = mng.DeleteFiles(name); return(Json(res, JsonRequestBehavior.AllowGet)); }
// GET: GoogleDrive public ActionResult Index() { GoogleManager mng = new GoogleManager(); mng.Authentications(); List <string> title = mng.GetFiles(); ViewBag.name = title; return(View()); }
public JsonResult EditDoc(MitemEditModel json) { string content = json.theHtml; string idFile = json.idFile; GoogleManager mng = new GoogleManager(); mng.Authentications(); bool res = mng.UpdataDocument(idFile, content); return(Json(res, JsonRequestBehavior.AllowGet)); }
public JsonResult CreateDoc(MItemtModel jsonObject) { string text = jsonObject.theHtml; string title = jsonObject.title; GoogleManager mng = new GoogleManager(); mng.Authentications(); bool res = mng.CreateDocument(title, text); return(Json(res, JsonRequestBehavior.AllowGet)); }
// Called when the player died public void GameOver() { GameState = GameState.GameOver; GameCount++; if (GameCount % 5 == 0) { //UnityAds.instance.ShowAd(); } GoogleManager.ReportScore(); StartCoroutine(CRStopMusic(1f)); }
private INode LoadGoogleBackupsFolder(string parentId = "root", string folderName = "tst") { Console.WriteLine("Searching for first AKA root level stuff"); var cachedId = GetFromCache(folderName, parentId); if (!String.IsNullOrEmpty(cachedId)) { return(GoogleManager.GetTree(cachedId)); } Console.WriteLine($"No saved data about {folderName} folder"); var parent = GoogleManager.GetTree(parentId); var node = GetGoogleNodeByNameAndParent(parent, folderName); Console.WriteLine($"{folderName} loaded"); AddToCache(node, parentId); return(node); }
// Start is called before the first frame update void Awake() { //PlayerPrefs.DeleteAll(); if (Instance == null) { Instance = this; } //구글 서비스 활성화 #if UNITY_ANDROID PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder() .EnableSavedGames() .Build(); PlayGamesPlatform.InitializeInstance(config); PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate(); #elif UNITY_IOS GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true); #endif }
// Use this for initialization void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { DestroyImmediate(this); } PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder() // enables saving game progress. .EnableSavedGames() .Build(); PlayGamesPlatform.InitializeInstance(config); PlayGamesPlatform.DebugLogEnabled = false; PlayGamesPlatform.Activate(); }
void Start() { scenarioHandlerRef = this.GetComponent<ScenarioHandler>(); if (bQuestionnaireEnabled) { googleManager = this.GetComponent<GoogleManager>(); playerRef = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>(); answersList = new Dictionary<string,string>(); questionsList = new Dictionary<string,string>(); helperTextList = new Dictionary<string, string>(); FindAllQuestions(); lastPage = scenarioHandlerRef.GetScenarioCount()+1; lastPage++; likertAnswers = new int[lastPage]; wantBuildAnswers = new string[lastPage]; commentAnswers = new string[lastPage]; for (int i = 0; i < lastPage; i++) { likertAnswers[i] = 0; wantBuildAnswers[i] = ""; commentAnswers[i] = ""; } lastPage--; float screenWidth = Screen.width * 0.95f, screenHeight = Screen.height * 0.90f; qWidth = (screenWidth > qWidth) ? screenWidth : qWidth; qHeight = (screenHeight > qHeight) ? screenHeight : qHeight; questionnaireRect = new Rect((Screen.width/2f) - (qWidth/2f), (Screen.height/2f) - (qHeight/2f), qWidth, qHeight); windowStyle.normal.background = MakeColorTexture((int)qWidth+1, (int)qHeight+1, Color.black); } }
void GameOver() { GameState = GameState.GameOver; AppsFlyerMMP.Score(ScoreManager.Instance.Score); GoogleManager.ReportScore(); }
public GoogleController(IUnitOfWorkAsync unitOfWorkAsync) : base(unitOfWorkAsync) { google = new GoogleManager(key, engine); }
// 클라우드 데이터 로드 public void LoadCloud() { GoogleManager.SavedGame().OpenWithAutomaticConflictResolution("buildingsave", DataSource.ReadCacheOrNetwork, ConflictResolutionStrategy.UseLastKnownGood, BuildingLoad); GoogleManager.SavedGame().OpenWithAutomaticConflictResolution("questsave", DataSource.ReadCacheOrNetwork, ConflictResolutionStrategy.UseLastKnownGood, QuestLoad); GoogleManager.SavedGame().OpenWithAutomaticConflictResolution("resourcesave", DataSource.ReadCacheOrNetwork, ConflictResolutionStrategy.UseLastKnownGood, ResourceLoad); }
//저장된 게임 체크 (처음이면 도시이름 짓기 On) void SavedGameCheck() { GoogleManager.SavedGame().OpenWithAutomaticConflictResolution("resourcesave", DataSource.ReadCacheOrNetwork, ConflictResolutionStrategy.UseLongestPlaytime, CityNamePanelOn); }