protected void LoadLibrary() { //Debug.Log("Loading library..."); entryLibrary.GenerateDictionary(); //Debug.Log("Finished loading library"); InitializeWindow(); }
void LoadLibrary() { Debug.Log("Loading kanji libraries..."); kanjiLibrary.GenerateDictionary(); Debug.Log("Finished loading kanji libraries"); InitializeWindow(); }
// Use this for initialization private void OnEnable() { itemLibrary.GenerateDictionary(); moduleLibrary.GenerateDictionary(); SelectSaveFile(-1); if (progress != null) { progress.ShowCurrentProgress(); } }
void LoadLibrary() { Debug.Log("Loading background libraries..."); backgroundLibrary.GenerateDictionary(); Debug.Log("Finished loading background libraries"); InitializeWindow(); }
void LoadLibrary() { Debug.Log("Loading character libraries..."); enemyLibrary.GenerateDictionary(); Debug.Log("Finished loading character libraries"); InitializeWindow(); }
void LoadLibrary() { Debug.Log("Loading battle library..."); battleLibrary.GenerateDictionary(); Debug.Log("Finished loading battle library"); InitializeWindow(); }
void LoadLibrary() { Debug.Log("Loading item equip libraries..."); itemLibrary.GenerateDictionary(); Debug.Log("Finished loading item equip libraries"); InitializeWindow(); }
void LoadLibrary() { Debug.Log("Loading song list libraries..."); musicLibrary.GenerateDictionary(); sfxLibrary.GenerateDictionary(); Debug.Log("Finished loading song list libraries"); InitializeWindow(); }
void Start() { scene = GetComponent <DialogueScene>(); dialogueLibrary.GenerateDictionary(); dialogueEntry = (DialogueEntry)dialogueLibrary.GetEntry(dialogueUuid.value); currentFrame.value = 0; scene.SetFromFrame(dialogueEntry.frames[0]); Debug.Log("Set frame 0 of dialogue " + dialogueUuid.value); backgroundChanged.Invoke(); bkgMusicChanged.Invoke(); characterChanged.Invoke(); closeupChanged.Invoke(); dialogueTextChanged.Invoke(); }
public void LeaveScoreScreen() { buttonClickEvent.Invoke(); battleLibrary.GenerateDictionary(); Debug.Log("UUID is: " + battleUuid.value); BattleEntry be = (BattleEntry)battleLibrary.GetEntry(battleUuid.value); switch (be.nextLocation) { case BattleEntry.NextLocation.OVERWORLD: paused.value = false; if (be.playerArea == Constants.OverworldArea.TOWER) { currentArea.value++; saveGame.Invoke(); } if (be.changePosition) { if (be.playerArea != Constants.OverworldArea.DEFAULT) { playerArea.value = (int)be.playerArea; } playerPosX.value = be.playerPosition.x; playerPosY.value = be.playerPosition.y; } currentArea.value = playerArea.value; Debug.Log("Battle -> Overworld"); changeMapEvent.Invoke(); break; case BattleEntry.NextLocation.DIALOGUE: currentArea.value = (int)Constants.SCENE_INDEXES.DIALOGUE; dialogueUuid.value = be.nextDialogue.uuid; Debug.Log("Battle -> Dialogue"); changeMapEvent.Invoke(); break; case BattleEntry.NextLocation.BATTLE: currentArea.value = (int)Constants.SCENE_INDEXES.BATTLE; battleUuid.value = be.nextBattle.uuid; Debug.Log("Battle -> Battle"); changeMapEvent.Invoke(); break; } }
IEnumerator CreateEnemies() { while (!MainControllerScript.instance || !MainControllerScript.instance.initiated) { Debug.Log("Waiting"); yield return(null); } battleLibrary.GenerateDictionary(); be = (BattleEntry)battleLibrary.GetEntry(battleUuid.value); // Debug.Log(JsonUtility.ToJson(be)); numberOfEnemies = be.numberOfEnemies; enemySelection = be.enemyTypes; initiated = true; Debug.Log("EnemyController is ready"); }
/// <summary> /// Loads the player stats from the save class data. /// </summary> /// <param name="saveData"></param> public void LoadStats() { if (currentSaveFileIndex.value == -1) { Debug.Log("New game. Nothing to load."); return; } PlayerStatsSaveClass saveData = SaveController.instance.saveFiles.playerSave[currentSaveFileIndex.value]; //Overworld currentChapterIndex.value = saveData.currentChapterIndex; currentRoomNumber.value = saveData.currentRoomNumber; currentArea.value = playerArea.value = saveData.playerArea; playerPosX.value = saveData.playerPosX; playerPosY.value = saveData.playerPosY; //Follower playingAsAndroid.value = saveData.playingAsAndroid; useFollower.value = saveData.useFollower; //Exp totalExp.value = saveData.expTotal; CalculateExp(); //Inventory totalMoney.value = saveData.money; itemLibrary.GenerateDictionary(); moduleLibrary.GenerateDictionary(); invItemBag.LoadItemData(saveData.invItemBag, itemLibrary); invItemEquip.LoadItemData(saveData.invItemEquip, itemLibrary); invModuleBag.LoadItemData(saveData.invModuleBag, moduleLibrary); invModuleEquip.LoadItemData(saveData.invModuleEquip, moduleLibrary); //Time ingameDay.value = saveData.ingameDay; playedSeconds.value = saveData.playedSeconds; RecalculateStats(); loadCheckEvent.Invoke(); Debug.Log("LOADED"); }
/// <summary> /// Initializes the variables needed by the editor. /// </summary> void InitializeWindow() { if (EditorApplication.isPlaying) { return; } backgroundLibrary.GenerateDictionary(); characterLibrary.GenerateDictionary(); dialogueLibrary.GenerateDictionary(); if (hub == null) { hub = new DialogueHub(backgroundLibrary, characterLibrary, dialogueLibrary, dialogueValues); } if (dlw != null && daw == null) { daw = GetWindow <DialogueActionWindow>("Dialogue Editor New"); daw.InitializeWindow(hub, this); } InitTextures(); GenerateAreas(); }
/// <summary> /// Loads the player stats from the save class data. /// </summary> /// <param name="saveData"></param> public void LoadStats(PlayerStatsSaveClass saveData) { //Overworld currentArea.value = saveData.currentArea; playerArea.value = saveData.playerArea; playerPosX.value = saveData.playerPosX; playerPosY.value = saveData.playerPosY; //Exp totalExp.value = saveData.expTotal; //Inventory totalMoney.value = saveData.money; itemLibrary.GenerateDictionary(); invItemBag.LoadItemData(saveData.invItemBag, itemLibrary); invItemEquip.LoadItemData(saveData.invItemEquip, itemLibrary); invKanjiBag.LoadItemData(saveData.invKanjiBag, itemLibrary); invKanjiEquip.LoadItemData(saveData.invKanjiEquip, itemLibrary); //Time ingameDay.value = saveData.ingameDay; playedSeconds.value = saveData.playedSeconds; }
void Start() { scene = GetComponent <DialogueScene>(); dialogueLibrary.initialized = false; dialogueLibrary.GenerateDictionary(); dialogueEntry = (DialogueEntry)dialogueLibrary.GetEntry(dialogueUuid.value); if (!overrideActionNumber.value) { currentAction.value = 0; scene.Reset(); } else { overrideActionNumber.value = false; } NextFrame(); scene.backgroundChanged.Invoke(); scene.bkgMusicChanged.Invoke(); scene.characterChanged.Invoke(); scene.closeupChanged.Invoke(); scene.dialogueTextChanged.Invoke(); }
public void LoadGame() { Debug.Log("###LOAD GAME FUNCTION CALLED###"); characterLibrary.GenerateDictionary(); spriteLibrary.GenerateDictionary(); SetPath(); SaveData data = ReadFile(); Debug.Log(JsonUtility.ToJson(data)); //Character PlayerCharacter character = (PlayerCharacter)characterLibrary.GetEntry(data.characterID); selectedCharacter.reference = character; for (int i = 0; i < character.spells.Length; i++) { spellRefs[i].reference = character.spells[i]; } // Player stats for (int i = 0; i < playerGains.Length; i++) { playerGains[i].value = data.playerGains[i]; } for (int i = 0; i < playerStats.Length; i++) { playerStats[i].value = data.playerStats[i]; } //Spells for (int i = 0; i < spellRefs.Length; i++) { spellRefs[i].level = data.spellLevels[i]; } Debug.Log("Finished loading stats"); //Inventory ItemEntry item; equipItems.values = new ItemEntry[data.equippedItems.Length]; for (int i = 0; i < data.equippedItems.Length; i++) { if (data.equippedItems[i] == null || !data.equippedItems[i].isItem) { continue; } item = (ItemEntry)ScriptableObject.CreateInstance("ItemEntry"); item.icon = (SpriteEntry)spriteLibrary.GetEntry(data.equippedItems[i].iconID); item.Load(data.equippedItems[i]); equipItems.values[i] = item; } bagItems.values = new ItemEntry[data.bagItems.Length]; for (int i = 0; i < data.bagItems.Length; i++) { if (data.bagItems[i] == null || !data.bagItems[i].isItem) { continue; } item = (ItemEntry)ScriptableObject.CreateInstance("ItemEntry"); item.icon = (SpriteEntry)spriteLibrary.GetEntry(data.bagItems[i].iconID); item.Load(data.bagItems[i]); bagItems.values[i] = item; } //Other playtime.value = data.playTime; Debug.Log("Finished loading"); SceneManager.LoadScene(townStr); }