void Start() { dfUnity = DaggerfallUnity.Instance; songPlayer = GetComponent <DaggerfallSongPlayer>(); // Get local player GPS if not set if (LocalPlayerGPS == null) { LocalPlayerGPS = GameManager.Instance.PlayerGPS; } // Get streaming world if not set if (StreamingWorld == null) { StreamingWorld = GameManager.Instance.StreamingWorld; } // Get required player components if (LocalPlayerGPS) { playerEnterExit = LocalPlayerGPS.GetComponent <PlayerEnterExit>(); playerWeather = LocalPlayerGPS.GetComponent <PlayerWeather>(); } // Shuffle song on load or fast travel StreamingWorld.OnInitWorld += StreamingWorld_OnInitWorld; }
void Start() { dfUnity = DaggerfallUnity.Instance; songPlayer = GetComponent <DaggerfallSongPlayer>(); // Get local player GPS if not set if (LocalPlayerGPS == null) { LocalPlayerGPS = GameManager.Instance.PlayerGPS; } // Get player entity if (playerEntity == null) { playerEntity = GameManager.Instance.PlayerEntity; } // Get streaming world if not set if (StreamingWorld == null) { StreamingWorld = GameManager.Instance.StreamingWorld; } // Get required player components if (LocalPlayerGPS) { playerEnterExit = LocalPlayerGPS.GetComponent <PlayerEnterExit>(); playerWeather = LocalPlayerGPS.GetComponent <PlayerWeather>(); } }
void Awake() { dfUnity = DaggerfallUnity.Instance; audioSource = GetComponent <AudioSource>(); audioSource.spatialBlend = 0; dfAudioSource = GetComponent <DaggerfallAudioSource>(); dfSongPlayer = GetComponent <DaggerfallSongPlayer>(); dfPauseOptionsWindow = new DaggerfallPauseOptionsWindow(uiManager); dfCharacterSheetWindow = new DaggerfallCharacterSheetWindow(uiManager); dfInventoryWindow = new DaggerfallInventoryWindow(uiManager); dfControlsWindow = new DaggerfallControlsWindow(uiManager); dfJoystickControlsWindow = new DaggerfallJoystickControlsWindow(uiManager); dfUnityMouseControlsWindow = new DaggerfallUnityMouseControlsWindow(uiManager); dfTravelMapWindow = new DaggerfallTravelMapWindow(uiManager); dfAutomapWindow = new DaggerfallAutomapWindow(uiManager); dfBookReaderWindow = new DaggerfallBookReaderWindow(uiManager); dfQuestJournalWindow = new DaggerfallQuestJournalWindow(uiManager); dfTalkWindow = new DaggerfallTalkWindow(uiManager); dfSpellBookWindow = new DaggerfallSpellBookWindow(uiManager); dfSpellMakerWindow = new DaggerfallSpellMakerWindow(uiManager); dfCourtWindow = new DaggerfallCourtWindow(uiManager); dfExteriorAutomapWindow = new DaggerfallExteriorAutomapWindow(uiManager); dfQuestInspector = new QuestMachineInspectorWindow(uiManager); Questing.Actions.GivePc.OnOfferPending += GivePc_OnOfferPending; SetupSingleton(); }
public static string Execute(params string[] args) { DaggerfallWorkshop.StreamingWorld streamingWorld = GameManager.Instance.StreamingWorld;//GameObject.FindObjectOfType<DaggerfallWorkshop.StreamingWorld>(); DaggerfallWorkshop.DaggerfallUnity daggerfallUnity = DaggerfallUnity.Instance; DaggerfallSongPlayer songPlayer = GameObject.FindObjectOfType <DaggerfallSongPlayer>(); DefaultCommands.showDebugStrings = !DefaultCommands.showDebugStrings; bool show = DefaultCommands.showDebugStrings; if (streamingWorld) { streamingWorld.ShowDebugString = show; } if (daggerfallUnity) { daggerfallUnity.WorldTime.ShowDebugString = show; } if (songPlayer) { songPlayer.ShowDebugString = show; } if (FPSDisplay.fpsDisplay == null) { GameManager.Instance.gameObject.AddComponent <FPSDisplay>(); } FPSDisplay.fpsDisplay.ShowDebugString = show; return(string.Format("Debug string show: {0}", show)); }
void Start() { dfUnity = DaggerfallUnity.Instance; songPlayer = GetComponent <DaggerfallSongPlayer>(); // Get local player GPS if not set if (LocalPlayerGPS == null) { LocalPlayerGPS = GameManager.Instance.PlayerGPS; } // Get player entity if (playerEntity == null) { playerEntity = GameManager.Instance.PlayerEntity; } // Get streaming world if not set if (StreamingWorld == null) { StreamingWorld = GameManager.Instance.StreamingWorld; } // Get required player components if (LocalPlayerGPS) { playerEnterExit = LocalPlayerGPS.GetComponent <PlayerEnterExit>(); playerWeather = LocalPlayerGPS.GetComponent <PlayerWeather>(); } // Use alternate music if set if (DaggerfallUnity.Settings.AlternateMusic) { DungeonInteriorSongs = _dungeonSongsFM; SunnySongs = _sunnySongsFM; CloudySongs = _cloudySongsFM; OvercastSongs = _overcastSongsFM; RainSongs = _weatherRainSongsFM; SnowSongs = _weatherSnowSongsFM; TempleSongs = _templeSongsFM; TavernSongs = new SongFiles[_tavernSongs.Length + _tavernSongsFM.Length]; Array.Copy(_tavernSongs, TavernSongs, _tavernSongs.Length); Array.Copy(_tavernSongsFM, 0, TavernSongs, _tavernSongs.Length, _tavernSongsFM.Length); NightSongs = _nightSongsFM; ShopSongs = _shopSongsFM; MagesGuildSongs = _magesGuildSongsFM; InteriorSongs = _interiorSongsFM; PalaceSongs = _palaceSongsFM; CastleSongs = _castleSongsFM; CourtSongs = _courtSongsFM; SneakingSongs = _sneakingSongsFM; } PlayerEnterExit.OnTransitionDungeonInterior += PlayerEnterExit_OnTransitionDungeonInterior; PlayerEnterExit.OnTransitionInterior += PlayerEnterExit_OnTransitionInterior; }
void Start() { dfUnity = DaggerfallUnity.Instance; streamingWorld = GameObject.FindObjectOfType <StreamingWorld>(); titleScreen = GameObject.FindObjectOfType <ShowTitleScreen>(); songPlayer = GameObject.FindObjectOfType <DaggerfallSongPlayer>(); playerEnterExit = GetComponent <PlayerEnterExit>(); if (songPlayer) { songPlayer.Song = SongFilesAll.song_03; } }
public override void Update(Task caller) { base.Update(caller); GameObject go = GameObject.Find("SongPlayer"); if (go != null) { DaggerfallSongPlayer player = go.GetComponent <DaggerfallSongPlayer>(); if (player != null) { player.Play(songFile); } } SetComplete(); }
void Awake() { dfUnity = DaggerfallUnity.Instance; audioSource = GetComponent <AudioSource>(); audioSource.spatialBlend = 0; dfAudioSource = GetComponent <DaggerfallAudioSource>(); dfSongPlayer = GetComponent <DaggerfallSongPlayer>(); dfPauseOptionsWindow = new DaggerfallPauseOptionsWindow(uiManager); dfCharacterSheetWindow = new DaggerfallCharacterSheetWindow(uiManager); dfInventoryWindow = new DaggerfallInventoryWindow(uiManager); dfTravelMapWindow = new DaggerfallTravelMapWindow(uiManager); dfAutomapWindow = new DaggerfallAutomapWindow(uiManager); dfExteriorAutomapWindow = new DaggerfallExteriorAutomapWindow(uiManager); dfQuestInspector = new QuestMachineInspectorWindow(uiManager); SetupSingleton(); }
void Start() { dfUnity = DaggerfallUnity.Instance; songPlayer = GetComponent <DaggerfallSongPlayer>(); // Try to find local player GPS if not set if (LocalPlayerGPS == null) { GameObject player = GameObject.FindGameObjectWithTag("Player"); if (player) { LocalPlayerGPS = player.GetComponent <PlayerGPS>(); } } // Get required player components if (LocalPlayerGPS) { playerEnterExit = LocalPlayerGPS.GetComponent <PlayerEnterExit>(); playerWeather = LocalPlayerGPS.GetComponent <PlayerWeather>(); } }
void Awake() { dfUnity = DaggerfallUnity.Instance; audioSource = GetComponent <AudioSource>(); audioSource.spatialBlend = 0; dfAudioSource = GetComponent <DaggerfallAudioSource>(); dfSongPlayer = GetComponent <DaggerfallSongPlayer>(); dfPauseOptionsWindow = new DaggerfallPauseOptionsWindow(uiManager); //dfPauseOptionsWindow.OnClose += PauseOptionsDialog_OnClose; dfCharacterSheetWindow = new DaggerfallCharacterSheetWindow(uiManager); //dfCharacterSheetWindow.OnClose += CharacterSheetWindow_OnClose; dfInventoryWindow = new DaggerfallInventoryWindow(uiManager); //dfInventoryWindow.OnClose += InventoryWindow_OnClose; dfTravelMapWindow = new DaggerfallTravelMapWindow(uiManager); dfAutomapWindow = new DaggerfallAutomapWindow(uiManager); //dfAutomapWindow.OnClose += AutomapDialog_OnClose; SetupSingleton(); }
void Awake() { dfUnity = DaggerfallUnity.Instance; audioSource = GetComponent<AudioSource>(); audioSource.spatialBlend = 0; dfAudioSource = GetComponent<DaggerfallAudioSource>(); dfSongPlayer = GetComponent<DaggerfallSongPlayer>(); dfPauseOptionsWindow = new DaggerfallPauseOptionsWindow(uiManager); //dfPauseOptionsWindow.OnClose += PauseOptionsDialog_OnClose; dfCharacterSheetWindow = new DaggerfallCharacterSheetWindow(uiManager); //dfCharacterSheetWindow.OnClose += CharacterSheetWindow_OnClose; dfInventoryWindow = new DaggerfallInventoryWindow(uiManager); //dfInventoryWindow.OnClose += InventoryWindow_OnClose; dfTravelMapWindow = new DaggerfallTravelMapWindow(uiManager); dfAutomapWindow = new DaggerfallAutomapWindow(uiManager); //dfAutomapWindow.OnClose += AutomapDialog_OnClose; SetupSingleton(); }