private void Update() { var mPath = Application.dataPath; //Output the Game data path to the console Debug.Log("dataPath : " + mPath); if (_currentSpeech <= LastCurrentSpeech) { return; } LastCurrentSpeech = _currentSpeech; var speech = _dialogues.speeches[_currentSpeech]; BackgroundImage.sprite = Service.LoadSpriteByName(speech.background); SpeakerImage.sprite = Service.LoadSpriteByName(speech.speaker.portrait); SpeakerText.text = speech.value; SpeakerName.text = speech.speaker.name; if (speech.backgroundSound != null && !speech.backgroundSound.Equals("")) { BackgroundSoundManager.Play(speech.backgroundSound); } if ([email protected] == null || [email protected] == null) { return; } Service.Save(_currentSpeech); EventCaller.CallEvent([email protected], [email protected]); }
protected override void Execute() { VisualNovelService.Save(VisualNovelIndexes.SequenceFromIsNecessary); BackgroundSoundManager.Play("Aventura"); SceneManager.LoadScene("VisualNovel"); }
protected override void Execute() { VisualNovelService.Save(VisualNovelIndexes.SequenceFromThereIsNothingYouCanDo); BackgroundSoundManager.Play("Aventura"); SceneManager.LoadScene("VisualNovel"); }
protected override void Execute() { TransitionService.Save(TransitionIndexes.SequenceFromGoToVillage); VisualNovelService.Save(VisualNovelIndexes.SequenceFromGoToVillage); BackgroundSoundManager.Play("Tranquila"); SceneManager.LoadScene("Transition"); }
private void Awake() { Instance = this; if (musicAudioSource == null) { musicAudioSource = gameObject.AddComponent <AudioSource>(); } }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); current_scene = SceneManager.GetActiveScene().name; audioSource = GetComponent <AudioSource>(); audioSource.clip = bgm[0]; audioSource.Play(); } else if (instance != this) { Destroy(gameObject); } }
// RENDER private void Update() { if (_currentBattleIndex <= _lastCurrentBattleIndex) { return; } _heroes = HeroService.LoadHeroesInBattle(_currentBattle)?.ToList(); _currentHeroIndex = 0; _currentEnemyIndex = 0; _enemies = _currentBattle.enemies; DrawSpriteToGameObject(_currentBattle.background, "Background"); DrawEnemy(); DrawMenu(); BackgroundSoundManager.Play(_currentBattle.backgroundSound); _lastCurrentBattleIndex = _currentBattleIndex; }
private void Awake() { BackgroundSoundManager.Stop(); }
private void Awake() { BackgroundSoundManager.Play("Aventura"); }