// 씬 삭제 #region Remove functions public void Remove(SceneList scene) { if (_sceneList.ContainsKey(scene)) { _sceneList.Remove(scene); } }
private void Update() { SceneList data = null; if (this.startedLoading) { IEnumerable <LoadedSceneNode> source = from n in EngineService.Engine.SelectAll <LoadedSceneNode>() where n.sceneLoader.sceneName.Equals(base.GetInstanceID().ToString()) select n; if (source.Any <LoadedSceneNode>()) { data = (SceneList)source.First <LoadedSceneNode>().resourceData.Data; } } if (this.instantiating) { base.enabled = false; this.logger.Info("Complete"); base.Complete(); } else if (this.startedLoading && (data != null)) { this.logger.InfoFormat("Finished downloading scenes, instantiating...", new object[0]); this.instantiating = true; for (int i = 0; i < data.scenes.Length; i++) { if (data.scenes[i].initAfterLoading) { string sceneName = data.scenes[i].sceneName; this.logger.InfoFormat("LoadScene {0}", sceneName); UnityUtil.LoadScene(data.scenes[i].scene, sceneName, true); } } } }
public EventQueueGet( UUID reqid, string url, uint circuitCode, int timeoutms, SceneList sceneList, UUID sceneID, UUID partID, UUID itemID, ViewerAgentAccessor agent, ViewerConnection vc, Dictionary <MessageType, Action <Message> > messageRouting) { m_ReqID = reqid; m_Url = url; m_CircuitCode = circuitCode; m_TimeoutMs = timeoutms; m_Scenes = sceneList; m_SceneID = sceneID; m_PartID = partID; m_ItemID = itemID; m_ViewerAgent = agent; m_ViewerConnection = vc; m_MessageRouting = messageRouting; }
internal GameOptionSlider(GameObject parent, string key, float defaultValue = 0, EventDelegate eventDelegate = null, string goname = null) { this.key = key; this.defaultValue = defaultValue; if (goname == null) { goname = key; } string sceneName = SingletonMonoBehaviour <ManagementManager> .Instance.scenemanager.getNowSceneName(); if (SceneList.getSceneName(SceneList.Type.MyRoom) == sceneName) { GameObject gop = GameObject.Find(sceneName).transform.FindChild("UI Root/Camera/GameOptionPanel").gameObject; GameObject bgmSlider = gop.transform.FindChild("Option/Scroll View/SetVolume/SetBgmInfo").gameObject; GameObject copy = NGUIUtil.SetCloneChild(parent, bgmSlider, goname); container = copy; this.slider = copy.GetComponentInChildren <UISlider>(); if (eventDelegate != null) { eventDelegate.parameters[0] = new EventDelegate.Parameter(this); this.slider.onChange.Clear(); this.slider.onChange.Add(eventDelegate); } this.slider.value = this.value; } }
public void Insert(int index, Scene scene) { if (index < 0) { string errMsg = string.Format(Properties.Resources.ErrInsertSceneUnderMin, index, 0); Log.Error(errMsg); return; } if (index > SceneList.Count) { string errMsg = string.Format(Properties.Resources.ErrInsertSceneOverMax, index, SceneList.Count); Log.Error(errMsg); return; } if (null == scene) { Log.Error(Properties.Resources.ErrInsertSceneNullScene); return; } SceneList.Insert(index, scene); // Collection<T> accepts null as valid value. scene.Owner = this; insert(index, scene.Model); }
public override void Initialize() { Scenes = CreateSceneHandler(); Scenes.Window = WindowService.CreateWindow("test", new Vec2(100, 100), new Vec2(100, 100)); Scenes.Canvas = WindowService.CreateCanvas(Scenes.Window); Scenes.ContentLoader = WindowService.CreateContentLoader(Scenes.Canvas); }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_EstateService = loader.GetService <EstateServiceInterface>(m_EstateServiceName); m_RegionStorage = loader.GetService <GridServiceInterface>(m_RegionStorageName); loader.CommandRegistry.AddShowCommand("estates", ShowEstatesCmd); loader.CommandRegistry.AddChangeCommand("estate", ChangeEstateCmd); loader.CommandRegistry.AddCreateCommand("estate", CreateEstateCmd); loader.CommandRegistry.AddDeleteCommand("estate", DeleteEstateCmd); loader.CommandRegistry.AddAlertCommand("estate", AlertEstateCmd); var avatarNameServicesList = new RwLockedList <AvatarNameServiceInterface>(); IConfig sceneConfig = loader.Config.Configs["DefaultSceneImplementation"]; if (sceneConfig != null) { string avatarNameServices = sceneConfig.GetString("AvatarNameServices", string.Empty); if (!string.IsNullOrEmpty(avatarNameServices)) { foreach (string p in avatarNameServices.Split(',')) { avatarNameServicesList.Add(loader.GetService <AvatarNameServiceInterface>(p.Trim())); } } } m_AvatarNameService = new AggregatingAvatarNameService(avatarNameServicesList); }
void UpdateState(SceneList a_newScene) { SceneList prevGameScene = currentScene; currentScene = a_newScene; switch (currentScene) { /*case GameState.PREGAME: * Time.timeScale = 1; * break; * * case GameState.RUNNING: * Time.timeScale = 1; * break; * * case GameState.PAUSED: * Time.timeScale = 0; * break;*/ default: break; } OnGameSceneChanged.Invoke(prevGameScene, currentScene); }
private void SwitchScenes() { if (Input.GetKeyDown(KeyCode.Alpha1)) { currentScene = SceneList.MainMenuScene; LoadScene(); } if (Input.GetKeyDown(KeyCode.Alpha2)) { currentScene = SceneList.LoadingScene; LoadScene(); } if (Input.GetKeyDown(KeyCode.Alpha3)) { currentScene = SceneList.DefaultScene; LoadScene(); } if (Input.GetKeyDown(KeyCode.Alpha4)) { currentScene = SceneList.GameOverScene; LoadScene(); } if (Input.GetKeyDown(KeyCode.Alpha5)) { currentScene = SceneList.DebugScene; LoadScene(); } }
public void Startup(ConfigurationLoader loader) { HomeURI = loader.HomeURI; m_AgentInventoryService = loader.GetService <InventoryServiceInterface>(m_AgentInventoryServiceName); m_AgentAssetService = loader.GetService <AssetServiceInterface>(m_AgentAssetServiceName); if (m_AgentProfileServiceName?.Length != 0) { m_AgentProfileService = loader.GetService <ProfileServiceInterface>(m_AgentProfileServiceName); } m_AgentFriendsService = loader.GetService <FriendsServiceInterface>(m_AgentFriendsServiceName); m_UserSessionService = loader.GetService <UserSessionServiceInterface>(m_UserSessionServiceName); m_GridService = loader.GetService <GridServiceInterface>(m_GridServiceName); if (m_OfflineIMServiceName?.Length != 0) { m_OfflineIMService = loader.GetService <OfflineIMServiceInterface>(m_OfflineIMServiceName); } if (m_AgentExperienceServiceName?.Length != 0) { loader.GetService(m_AgentExperienceServiceName, out m_AgentExperienceService); } if (m_AgentGroupsServiceName?.Length != 0) { loader.GetService(m_AgentGroupsServiceName, out m_AgentGroupsService); } m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); m_AgentUserAgentService = new LocalUserAgentService(m_UserSessionService, m_UserAccountService, m_RequiresInventoryIDAsIMSessionID, HomeURI); m_Scenes = loader.Scenes; m_Commands = loader.CommandRegistry; m_CapsRedirector = loader.CapsRedirector; m_PacketHandlerPlugins = loader.GetServicesByValue <IProtocolExtender>(); }
//public CommonCommand RefreshToDoListCommand //{ // get // { // return new CommonCommand((o) => // { // RefreshToDoList(); // }); // } //} public override void LoadInfo() { EpisodeList.Clear(); TargetObject.EpisodeList.ForEach(v => { EpisodeList.Add(new EpisodeViewModel() { TargetObject = v }); }); SceneList.Clear(); TargetObject.SceneList.ForEach(v => { SceneList.Add(new SceneViewModel() { TargetObject = v }); }); NoteList.Clear(); TargetObject.NoteList.ForEach(v => NoteList.Add(new NoteViewModel() { TargetObject = v })); //RefreshToDoList(); base.LoadInfo(); }
private void MainMenu(int id) { GUILayout.Label("Test"); if (GUILayout.Button("Start Game")) { this.active_scene = SceneList.Loading; Debug.Log("Start game calling..."); GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), blackbg); SceneManager.LoadScene("SceneLevel1"); this.active_scene = SceneList.Level1; Debug.Log("Start game called!"); } if (GUILayout.Button("Options")) { m_SoundSource.PlayOneShot(ClickSound); ActiveMenu = MenuTypes.OptionsMenu; // Code for options } if (!Application.isWebPlayer && !Application.isEditor) { if (GUILayout.Button("Exit")) { Application.Quit(); } } }
public override void Update() { base.Update(); //Debug.LogFormat("Network Identities {0}", networkIdentities.Count); //Ping update every minute to keep server running smoothly when someone is connected timer += Time.deltaTime; if (timer >= PING_SERVER_TIME) { Emit(NetworkTags.PING); timer = 0; pingTimer = 0; isCountingPing = true; } if (isCountingPing) { pingTimer += Time.deltaTime; } if (!isConnected) { Debug.Log("Close down socket"); isConnected = true; Close(); LoaderManager.Instance.LoadLevel(SceneList.LOGIN, (LevelName) => { LoaderManager.Instance.UnLoadLevel(SceneList.ONLINE); LoaderManager.Instance.UnLoadLevel(SceneList.GetMapByIndex(PlayerInformation.Instance.CurrentRealm)); ApplicationManager.Instance.ShowIntroGraphics(); }); } }
static void WriteCatalogFile(string catalogPath, SceneList sceneList) { var catalogEntries = new List <CatalogEntry>(); //Register catalog entries for each scene to build var sceneInfos = sceneList.GetSceneInfosForBuild(); for (int i = 0; i < sceneInfos.Length; i++) { catalogEntries.Add(new CatalogEntry() { Path = sceneInfos[i].Path, MetaData = new ResourceMetaData() { ResourceFlags = sceneInfos[i].AutoLoad ? ResourceMetaData.Flags.AutoLoad : ResourceMetaData.Flags.None, ResourceId = sceneInfos[i].Scene.assetGUID, ResourceType = ResourceMetaData.Type.Scene } }); } var builder = new BlobBuilder(Allocator.Temp); ref var root = ref builder.ConstructRoot <ResourceCatalogData>();
//public accessor with order of operations public void SceneChange(SceneList sceneChange) { //SETUP //check if unloading all scenes if (sceneChange.unloadAll) { UnloadAll(); } //add scenes to be unloaded if (sceneChange.unloadNames != null) { QueueUnload(sceneChange.unloadNames); } //add scenes to be loaded if (sceneChange.loadNames != null) { QueueLoad(sceneChange.loadNames); } //determine loadscreen if (sceneChange.needsLoadScreen) { SetLoadScreen(true); } Activate(); }
public RestartObject(SceneList scenes, SceneInterface scene, SceneImplementationFactory sceneFactory, GridServiceInterface regionStorage) { m_Scenes = scenes; m_WeakScene = new WeakReference(scene); m_SceneFactory = sceneFactory; m_RegionStorage = regionStorage; RestartTimer.Elapsed += RestartTimerHandler; }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_ForeignGridConnectorPlugins = loader.GetServicesByValue <IForeignGridConnectorPlugin>(); ThreadManager.CreateThread(HandlerThread).Start(MapBlocksRequestQueue); ThreadManager.CreateThread(HandlerThread).Start(MapDetailsRequestQueue); }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_UserAgentServicePlugins = loader.GetServicesByValue <IUserAgentServicePlugin>(); m_AssetServicePlugins = loader.GetServicesByValue <IAssetServicePlugin>(); m_InventoryServicePlugins = loader.GetServicesByValue <IInventoryServicePlugin>(); m_IMService = loader.GetService <IMServiceInterface>(m_IMServiceName); }
public static SceneList getInstance() { if (instance == null) { instance = new SceneList(); } return(instance); }
public static SceneList CreateAssetAtPath(string path) { SceneList asset = ScriptableObject.CreateInstance <SceneList>(); asset.name = Path.GetFileName(path); AssetDatabase.CreateAsset(asset, path); return(asset); }
public void Startup(ConfigurationLoader loader) { m_GatekeeperUri = loader.GatekeeperURI; m_Scenes = loader.Scenes; m_ExternalHostNameService = loader.ExternalHostNameService; m_SceneFactory = loader.GetService <SceneFactoryInterface>("DefaultSceneImplementation"); m_RegionService = loader.GetService <GridServiceInterface>(m_RegionStorage); }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_Scenes.OnRegionAdd += OnSceneAdded; m_HttpServer = loader.HttpServer; loader.XmlRpcServer.XmlRpcMethods.Add("preflightBuyLandPrep", HandlePreFlightBuyLandPrep); loader.XmlRpcServer.XmlRpcMethods.Add("buyLandPrep", HandleBuyLandPrep); }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_IMService = loader.GetService <IMServiceInterface>(m_IMServiceName); m_FriendsPlugins = loader.GetServicesByValue <IFriendsServicePlugin>(); m_UserAgentPlugins = loader.GetServicesByValue <IUserAgentServicePlugin>(); ThreadManager.CreateThread(HandlerThread).Start(); }
protected override void Initialize(ServiceProvider provider) { base.Initialize(provider); _provider = provider; provider.Service(out _synchronizer); this.Scenes = provider.GetService <SceneList>(); }
// 씬 검색 #region Search function public Scene GetScene(SceneList scene) { if (!_sceneList.ContainsKey(scene)) { return(null); } return(_sceneList[scene]); }
/// <summary> /// Adds a Scene to the Scene Manager /// </summary> /// <param name="scene">The Scene to add</param> private void AddScene(GameScreen scene) { scenesToUpdate.Add(scene.Name, scene); if (!SceneList.Contains(scene)) { SceneList.Add(scene); } }
private static SceneList GetSceneList() { SceneList list = AssetDatabase.LoadAssetAtPath <SceneList>("Assets/Resources/SceneList.asset"); if (list == null) { list = ScriptableObject.CreateInstance <SceneList>(); AssetDatabase.CreateAsset(list, "Assets/Resources/SceneList.asset"); } return(list); }
void MenuSetSceneList(object o) { CurrentSceneList = (SceneList)o; if (CurrentTemplate != null && !CurrentTemplate.name.EndsWith("*")) { CurrentTemplate = Instantiate <BuildTemplate>(CurrentTemplate) as BuildTemplate; CurrentTemplate.name += "*"; } CurrentTemplate.SceneList = CurrentSceneList; }
private static void SetSceneListUpdated(bool isUp) { SceneList list = GetSceneList(); if (list.isUpdated != isUp) { list.isUpdated = isUp; EditorUtility.SetDirty(list); AssetDatabase.SaveAssets(); } }
public void JsonToViewModel(SceneListViewModel sceneListViewModel, string fileContent) { SceneList sceneList = JsonConvert.DeserializeObject <SceneList>(fileContent); sceneListViewModel.SceneList.Clear(); sceneListViewModel.AudioFolderName = sceneList.AudioFolderName; foreach (Scene scene in sceneList.scenes) { sceneListViewModel.SceneList.Add(new SceneViewModel(sceneListViewModel, scene)); } }
public void Initialize(string title, int width, int height) { Scene.Initialize(title, width, height); _scenes = SetupScenes(); }
public void AddScene( SceneList sceneIdentifier, Scene scene ) { scenes.Add(sceneIdentifier, scene); }
public Scene getGameState(SceneList sceneIdentifier) { return scenes[sceneIdentifier]; }
public void RemoveGameState( SceneList sceneIdentifier ) { scenes.Remove(sceneIdentifier); }