public void SpawnCreditsPaperwork() { if (DeveloperProfileIndex >= DeveloperProfileCount) { bCreditsDone = true; MarkerOfDeath.instance.MarkerDisappear(); StartCoroutine(ThankRoutine()); } else { Paperwork newPaperwork = Instantiate(PaperworkManager.instance.PaperworkTemplate); newPaperwork.bIsCreditsProfile = true; newPaperwork.InitFromProfile(ProfileManager.instance.DeveloperProfileList[DeveloperProfileIndex], GrimDesk.instance.PaperWorkSpawnMarker.gameObject.transform.position, GrimDesk.instance.PaperWorkSpawnMarker.gameObject.transform.rotation, false, 0, false); newPaperwork.gameObject.transform.SetParent(gameObject.transform); int spawnMarkerIndex = DeveloperProfileIndex % PaperworkMarkers.Count; Vector3 spawnPos = newPaperwork.gameObject.transform.position; spawnPos.x = PaperworkMarkers[spawnMarkerIndex].transform.position.x; spawnPos.y = PaperworkMarkers[spawnMarkerIndex].transform.position.y; newPaperwork.gameObject.transform.position = spawnPos; newPaperwork.FocusPaperwork(); CurrentPaperwork = newPaperwork; DeveloperProfileIndex++; } }
public void NotifyStartDay(bool restoreFromSave) { List <template_profile> profiles = new List <template_profile>(DesktopManager.instance.GetProfiles()); int profileCount = profiles.Count; if (!restoreFromSave) { if (SaveManager.instance.GetCurrentPlayerState().GetCurrentDayNumberNotIndexThisHasOneAddedToIt() == 4) { SaveManager.instance.GetCurrentCarryoverPlayerState().FateAttentionProfileIndex = Random.Range(0, profileCount); } else { SaveManager.instance.GetCurrentCarryoverPlayerState().FateAttentionProfileIndex = -1; } SaveManager.instance.MarkSavegameDirty(); } //TODO: ARTICY VAR TO CHECK IF IT HAS BEEN DEADED OR LIVE int fateAttentionProfileIndex = SaveManager.instance.GetCurrentCarryoverPlayerState().FateAttentionProfileIndex; for (int i = 0; i < profileCount; ++i) { Paperwork newPaperwork = Instantiate(PaperworkTemplate); if (restoreFromSave) { newPaperwork.InitFromProfile(profiles[i], GrimDesk.instance.PaperWorkSpawnMarker.gameObject.transform.position + new Vector3(1.0f * (i % 4), 0.3f * (i % 4) - 0.6f * Mathf.FloorToInt(i / 4), -i * 2 - 3), GrimDesk.instance.PaperWorkSpawnMarker.gameObject.transform.rotation, restoreFromSave, i, i == fateAttentionProfileIndex); } else { int profileIndex = Random.Range(0, profiles.Count); newPaperwork.InitFromProfile(profiles[profileIndex], GrimDesk.instance.PaperWorkSpawnMarker.gameObject.transform.position + new Vector3(1.0f * (i % 4), 0.3f * (i % 4) - 0.6f * Mathf.FloorToInt(i / 4), -i * 2 - 3), GrimDesk.instance.PaperWorkSpawnMarker.gameObject.transform.rotation, restoreFromSave, i, i == fateAttentionProfileIndex); profiles.RemoveAt(profileIndex); } newPaperwork.name += i; //newPaperwork.StartFadeInParticle(); PaperworkList.Add(newPaperwork); } }