// Use this for initialization /// <summary> /// Initialization function for the AlphaPanelHandler. /// </summary> void Start() { //panelRectTransform = transform as RectTransform; drawCanvasRectTransform = alphaCanvas.transform as RectTransform; //maxWidth = panelRectTransform.rect.width - borderSize; //maxHeight = panelRectTransform.rect.height - borderSize; //minWidth = borderSize; //minHeight = borderSize; maxWidth = drawCanvasRectTransform.rect.width; maxHeight = drawCanvasRectTransform.rect.height; minWidth = 0.0f; minHeight = 0.0f; transferFunctionHandler = (TransferFunctionHandler)GameObject.Find("Transfer Function Panel").GetComponent(typeof(TransferFunctionHandler)); volumeController = (VolumeController)GameObject.Find("VolumeController").GetComponent(typeof(VolumeController)); transferFunction = volumeController.getTransferFunction(); maxIsovalueLabel.text = transferFunction.IsovalueRange.ToString(); // Initialize the control point renderers controlPointRenderers = new List <ControlPointRenderer>(); for (int i = 0; i < transferFunction.AlphaPoints.Count; i++) { controlPointRenderers.Add(new ControlPointRenderer(transferFunction.AlphaPoints[i], createControlPointImage(transferFunction.AlphaPoints[i])) ); } }
private void Awake() { if (!volumeController) { volumeController = GetComponent <VolumeController>(); } }
void Start() { volumeController = GameObject.Find("UI") .GetComponent <VolumeController>(); if (PlayerPrefs.GetFloat("MusicVolumeFirstSet") == 0) { InitMusicSlider(.7f); SetMusicVolume(.7f); PlayerPrefs.SetFloat("MusicVolumeFirstSet", 1); } else { InitMusicSlider(PlayerPrefs.GetFloat("MusicVolume")); } if (PlayerPrefs.GetFloat("SFXVolumeFirstSet") == 0) { InitSFXSlider(.7f); SetSFXVolume(.7f); PlayerPrefs.SetFloat("SFXVolumeFirstSet", 1); } else { InitSFXSlider(PlayerPrefs.GetFloat("SFXVolume")); } }
void Start() { //------------------------------------------------------- CLIENT AND SERVER NetID = GetComponent <NetworkIdentity>(); MRD = GetComponent <MirrorPlayer>(); MRD.Initialize(); if (NetID.hasAuthority)//--------------------------------- CLIENT { this.gameObject.tag = "Player"; Cam = GameObject.FindWithTag("Camera"); VC = GameObject.FindWithTag("Volume").GetComponent <VolumeController>(); r = GetComponent <Rigidbody>(); pitch = ToPitch.transform.localEulerAngles.x; AllColliders = this.transform.GetComponentsInChildren <Collider>(); GameObject.FindWithTag("Camera").GetComponent <MenuManager>().CM.Init(); } else //-------------------------------------------------- SERVER { MRD.MirrorStart(); } //Voice.AS.pitch = MRD.VoicePitch; called on rpc }
public VolumeDisplay(Element element, AnomalousMvcContext context, RocketWidget rocketWidget) { String volumeName = element.GetAttributeString("target"); this.context = context; this.element = element; this.rocketWidget = rocketWidget; if (VolumeController.tryGetCalculator(volumeName, out calculator)) { switch (element.GetAttributeString("units")) { case "percent": context.OnLoopUpdate += Context_OnLoopUpdatePercent; break; case "centimeters": context.OnLoopUpdate += Context_OnLoopUpdateCm; break; case "millimeters": default: context.OnLoopUpdate += Context_OnLoopUpdateMm; break; } } else { Log.Warning("Could not find a volume measurement named '{0}'. The volume will not be displayed.", volumeName); element.InnerRml = String.Format("Cannot find volume '{0}' in scene.", volumeName); } }
private Button saveButton; // The button used to save the current transfer function /// <summary> /// Initialization function for the TransferFunctionHandler. /// </summary> void Start() { // Set up the reference to the VolumeController volumeController = (VolumeController)GameObject.Find("Main Camera").GetComponent(typeof(VolumeController)); // Initialize the reference to the transfer function stored in the volume controller transferFunction = volumeController.TransferFunction; // Initialize the panel script references alphaPanelHandler = (AlphaPanelHandler)alphaPanel.GetComponent(typeof(AlphaPanelHandler)); colorPanelHandler = (ColorPanelHandler)colorPanel.GetComponent(typeof(ColorPanelHandler)); colorPaletteHandler = (ColorPalette)colorPalettePanel.GetComponent(typeof(ColorPalette)); // Set up the transfer function loading drop down menu and load the first transfer function in the list if (transferFunction.IsovalueRange == 255) { savedTransferFunctionFolderPath = "Assets/Resources/TransferFunctions8Bit/"; } else { savedTransferFunctionFolderPath = "Assets/Resources/TransferFunctions16Bit/"; } transferFunctionFileExtension = ".txt"; Button loadButton = (GameObject.Find("Load Button").GetComponent <Button>()); Button saveButton = (GameObject.Find("Save Button").GetComponent <Button>()); // Load "Assets/Resources/TransferFunctions" files into a list of strings List <string> fileNames = new List <string>(Directory.GetFiles(savedTransferFunctionFolderPath, "*.txt")); // Trim the directories from the file names for (int i = 0; i < fileNames.Count; i++) { fileNames[i] = Path.GetFileNameWithoutExtension(fileNames[i]); } // Populate the dropdown menu with these OptionData objects if (fileNames.Count > 0) { // Add the list of files to the dropdown menu dropdownMenu.AddOptions(fileNames); // Set the currentTransferFunctionFile to the first one in the list currentTransferFunctionFile = fileNames[0]; // Load the control points from the currentTransferFunctionFile, if there is one loadTransferFunction(); } else { // Populate the dropdown menu with dropdownMenu.AddOptions(new List <string>(new string[] { "New Transfer Function" })); // Deactivate the load button loadButton.interactable = false; } // Reset the flag transferFunction.TransferFunctionChanged = true; }
// Use this for initialization void Start() { volumeController = slider.GetComponent <VolumeController>(); qualitySelector = textMesh.GetComponent <QualitySelector>(); Button button = GetComponent <Button>(); button.onClick.AddListener(delegate { UpdateSettings(); }); }
/// <summary> /// Initialization function for the GeneralControlsHandler. /// </summary> void Start() { // Set up the reference to the VolumeController volumeController = (VolumeController)GameObject.Find("VolumeController").GetComponent(typeof(VolumeController)); // Initialize the user interface text fields maxStepsValueText.text = GameObject.Find("Max Steps Slider").GetComponent <Slider>().value.ToString(); normPerRayValueText.text = GameObject.Find("Norm Per Ray Slider").GetComponent <Slider>().value.ToString(); hzRenderLevelValueText.text = GameObject.Find("HZ Render Level Slider").GetComponent <Slider>().value.ToString(); }
void Start() { Cam = GetComponent <Camera>(); AS = GetComponent <AudioSource>(); //FFP = GameObject.FindWithTag("Information").GetComponent<Mirror.FizzySteam.FizzyFacepunch>(); OM = GameObject.FindWithTag("Information").GetComponent <OnlineManager>(); SceneManager.sceneLoaded += OnSceneLoaded; VC = GameObject.FindGameObjectWithTag("Volume").GetComponent <VolumeController>(); SetScreen("Main"); }
void Awake() { if (Instance == null) { DontDestroyOnLoad(gameObject); _instance = this; } else if (_instance != this) { Destroy(gameObject); } }
void Awake() { _VolumeController = GetComponentInChildren <VolumeController>(); BackgroundAudioSource.clip = CrowdNoiseBackgroundAudio; BackgroundAudioSource.volume = 0.0f; BackgroundAudioSource.Play(); BackgroundAudioSource.DOFade(0.5f, 2.0f); UIAudioSource.clip = StartGameBackgroundAudio; UIAudioSource.Play(); }
private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); volumeLevel = PlayerPrefs.GetFloat("volume"); } else { Destroy(gameObject); } }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
void Awake() { // Keep the game object Active between scenes if (Instance != null) { Destroy(gameObject); } else { Instance = this; DontDestroyOnLoad(gameObject); } }
/// <summary> /// Initialization function for ColorPalette. /// </summary> void Start() { // Initialize the color palette text fields redValueText.text = redSlider.value.ToString(); greenValueText.text = greenSlider.value.ToString(); blueValueText.text = blueSlider.value.ToString(); volumeController = (VolumeController)GameObject.Find("Main Camera").GetComponent(typeof(VolumeController)); transferFunction = volumeController.TransferFunction; currentColor = new Color(0, 0, 0, 1); // Don't display/use the color palette on startup this.gameObject.SetActive(false); }
public override void OnInspectorGUI() { DrawDefaultInspector(); VolumeController myTarget = (VolumeController)target; RenderMode oldRenderMode = myTarget.GetRenderMode(); RenderMode newRenderMode = (RenderMode)EditorGUILayout.EnumPopup("Rendermode", oldRenderMode); if (newRenderMode != oldRenderMode) { myTarget.SetRenderMode(newRenderMode); } light = EditorGUILayout.Toggle("Lightning", light); myTarget.SetLightning(light); }
/// <summary> /// Initialization function for the GeneralControlsHandler. /// </summary> void Start() { // Set up the reference to the VolumeController volumeController = (VolumeController)GameObject.Find("Main Camera").GetComponent(typeof(VolumeController)); GameObject.Find("HZ Render Level Slider").GetComponent <Slider>().minValue = 0; GameObject.Find("HZ Render Level Slider").GetComponent <Slider>().maxValue = volumeController.CurrentVolume.MaxZLevel;//Also can be found by using the log_2 function. // Initialize the user interface text fields maxStepsValueText.text = GameObject.Find("Max Steps Slider").GetComponent <Slider>().value.ToString(); normPerRayValueText.text = GameObject.Find("Norm Per Ray Slider").GetComponent <Slider>().value.ToString(); hzRenderLevelValueText.text = GameObject.Find("HZ Render Level Slider").GetComponent <Slider>().value.ToString(); lambdaValueText.text = (GameObject.Find("Lambda Slider").GetComponent <Slider>().value / 100).ToString(); //We divide by 100 here because the slider is set up on a scale from 0 to 100, incrementing by whole numbers. //Unity only allows sliders to increment by 0.1 using the arrows. I felt it would be better to increment by 0.01 using the arrows keys. Hence the slightly awkward work-around. }
/// <summary> /// Button click method to erase a volume /// </summary> private async void btnClean_Click(object sender, RoutedEventArgs e) { if (selectedItem != null && Models.Volume.checkDriveType(selectedItem.DriveType)) { resetProgressBar(); btnClean.IsEnabled = false; btnClean.Visibility = Visibility.Hidden; lbDeleteAlgorithm.Visibility = Visibility.Hidden; btnCancel.IsEnabled = true; btnCancel.Visibility = Visibility.Visible; // Clear all content lvReport.Items.Add(FindResource("msg_deleteStarted")); VolumeController.deleteVolume(selectedItem); lvReport.Items.Add(FindResource("msg_deleteEnded")); listViewReportScrollDown(); // Start writing random data cts = new CancellationTokenSource(); try { lvReport.Items.Add(FindResource("msg_eraseStarted")); await VolumeController.eraseVolume(cts.Token, selectedItem, algorithm); MessageBox.Show(FindResource("msg_eraseEnded").ToString()); } catch (Exception ex) { VolumeController.deleteVolume(selectedItem); lvReport.Items.Add(FindResource("msg_progressStoppedAt").ToString() + lblProgress.Content); MessageBox.Show(ex.Message); resetProgressBar(); } lvReport.Items.Add(FindResource("msg_done")); listViewReportScrollDown(); cts.Cancel(); btnClean.IsEnabled = true; btnClean.Visibility = Visibility.Visible; btnCancel.IsEnabled = false; btnCancel.Visibility = Visibility.Hidden; } }
void Start() { VC = FindObjectOfType <VolumeController> (); interactCanvas = GameObject.Find("InteractDialogue").GetComponent <Canvas> (); inv = GameObject.Find("Inventory").GetComponent <Inventory>(); cnvs = GameObject.Find("CanvasDialogue").GetComponent <Canvas> (); noteText = GameObject.Find("NoteText").GetComponent <Text> (); currentKarma.text = "Karma: " + karma.ToString(); playerPosition = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); PM = FindObjectOfType <PlayerMovement> (); GetCurrentScenes(); currentRoom.text = sceneName[0]; //if player is in dungeon if (sceneName[0] == "Dungeon") { DS = FindObjectOfType <DungeonSaver> (); } }
// Start is called before the first frame update void Start() { if (_volumeController != null) { GameObject.Destroy(_volumeController); } else { _volumeController = this; } DontDestroyOnLoad(this); VolumeSlider = VolumeSliderObject.GetComponent <Slider>(); volumeChanged = true; soundSegmentSize = 1f / (soundImages.Length - 1); setVolumeImage(); }
void Awake() { _source = gameObject.AddComponent <AudioSource>(); _source.playOnAwake = false; _VolumeController = GetComponentInChildren <VolumeController>(); if (BackgroundAudio != null) { SetBackgroundPlaying(UserPresenceController.Instance.IsMounted && _VolumeController.IsAudioOn); } if (IsGameEnvironment && GameBackgroundAudio) { BackgroundAudio.clip = GameBackgroundAudio; BackgroundAudio.volume = 0.0f; BackgroundAudio.Play(); BackgroundAudio.DOFade(1.0f, 2.0f); } }
void OnSceneLoaded(Scene scene, LoadSceneMode mode) { //Debug.Log("Scene Changed : " + scene.name); VC = GameObject.FindGameObjectWithTag("Volume").GetComponent <VolumeController>(); if (CurrentScreen == "Main") { this.transform.position = new Vector3(0f, 2f, 0f); this.transform.eulerAngles = new Vector3(0f, 90f, 0f); } else { //Debug.Log("Scene load changed, ready to call init"); //GameServer.GS.Init(); StartCoroutine(GameServer.GS.Init()); //CM.Init(); } //FFP.ServerStop(); SetScreen(CurrentScreen); }
// Use this for initialization void Start() { GameObject goVolumeController = GameObject.Find("BGM"); // TODO -- define this globally if (goVolumeController) { volumeController = goVolumeController.GetComponent<VolumeController>(); if (!volumeController) { Debug.Log("\"Volume Controller\" game object has no \"VolumeController\" component."); } volumeController.RegisterPlayer(this); } else { Debug.Log("Could not find object named \"Volume Controller\" in the scene."); } body2D = GetComponent<Rigidbody2D>(); }
/// <summary> /// Initialization function for the ColorPanelHandler. /// </summary> void Start() { panelRectTransform = transform as RectTransform; drawCanvasRectTransform = colorCanvas.transform as RectTransform; maxWidth = drawCanvasRectTransform.rect.width; minWidth = 0.0f; minHeight = 0.0f; transferFunctionHandler = (TransferFunctionHandler)GameObject.Find("Transfer Function Panel").GetComponent(typeof(TransferFunctionHandler)); volumeController = (VolumeController)GameObject.Find("Main Camera").GetComponent(typeof(VolumeController)); transferFunction = volumeController.TransferFunction; // Initialize the control point renderers controlPointRenderers = new List <ControlPointRenderer>(); for (int i = 0; i < transferFunction.ColorPoints.Count; i++) { controlPointRenderers.Add(new ControlPointRenderer(transferFunction.ColorPoints[i], createControlPointImage(transferFunction.ColorPoints[i])) ); } }
void Start() { /* { * if (!gmExists) * { * gmExists = true; * DontDestroyOnLoad(transform.gameObject); * * } * else * { * Destroy(gameObject); * } * * } */ // thePlayer.GetComponent<PlayerHealthManager>(); //DontDestroyOnLoad(pauseScreen); //This makes the user be able to pause between scenes theVC = GetComponent <VolumeController>(); //IF I FEEL LIKE SOLVING THE MUSIC BUG }
/// <summary> /// Initializes a new instance of the <see cref="ViewNavigator" /> class. /// </summary> /// <param name="volumeChangeNotifier">The volume change notifier.</param> /// <param name="menuRequester">The menu requester.</param> /// <param name="shutdownNotifier">The shutdown notifier.</param> /// <param name="volumeController">The volume controller.</param> /// <param name="textViewNavigator">The text view navigator.</param> /// <param name="viewFactory">The textView factory.</param> /// <param name="timerFactory">The timer factory.</param> /// <param name="viewNavigatorReporter">The view navigator reporter.</param> internal ViewNavigator( IVolumeChangeNotifier volumeChangeNotifier, MenuRequester menuRequester, IShutdownNotifier shutdownNotifier, VolumeController volumeController, ITextViewNavigator textViewNavigator, ViewFactory viewFactory, ITimerFactory timerFactory, IViewNavigatorReporter?viewNavigatorReporter = null) { this.textViewNavigator = textViewNavigator; this.volumeController = volumeController; this.viewFactory = viewFactory; this.viewNavigatorReporter = viewNavigatorReporter; this.viewNavigatorReporter?.SetSource(this); this.viewTimeoutTimer = timerFactory.Create(); this.viewTimeoutTimer.Tick += _ => this.NavigateBackAsync(); volumeChangeNotifier.VolumeChanged += this.OnVolumeControllerVolumeChanged; menuRequester.MenuRequested += this.OnMenuRequesterMenuRequested; shutdownNotifier.ShuttingDown += this.OnShutdownNotifierShuttingDown; }
/// <inheritdoc /> /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { base.LoadContent(); Resources.AddStore(new DllResourceStore("Quaver.Resources.dll")); SteamManager.SendAvatarRetrievalRequest(SteamUser.GetSteamID().m_SteamID); // Load all game assets. Fonts.Load(); BackgroundHelper.Initialize(); // Load the user's skin SkinManager.Load(); // Create the global FPS counter. CreateFpsCounter(); VolumeController = new VolumeController() { Parent = GlobalUserInterface }; BackgroundManager.Initialize(); Transitioner.Initialize(); // Make the cursor appear over the volume controller. ListHelper.Swap(GlobalUserInterface.Children, GlobalUserInterface.Children.IndexOf(GlobalUserInterface.Cursor), GlobalUserInterface.Children.IndexOf(VolumeController)); IsReadyToUpdate = true; Logger.Debug($"Currently running Quaver version: `{Version}`", LogType.Runtime); #if VISUAL_TESTS Window.Title = $"Quaver Visual Test Runner"; #else Window.Title = !IsDeployedBuild ? $"Quaver - {Version}" : $"Quaver v{Version}"; QuaverScreenManager.ScheduleScreenChange(() => new MenuScreen()); #endif }
protected void Application_Start(object sender, EventArgs e) { //// Not using MVC Areas right now. // AreaRegistration.RegisterAllAreas(); // standard MVC explicit initialization WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AuthConfig.RegisterAuth(); // Base behavior from shared MyHerbalife3HttpApplication OnApplicationStart(sender, e); ControllerBuilder.Current.DefaultNamespaces.Add("MyHerbalife3.Ordering.Controllers"); // Ensure Ordering specific API are using real implementation (not stand-ins) TopSellerProductsController.Inject(new TopSellerSource()); RecentOrdersController.Inject(new RecentOrdersSource()); CartWidgetController.Inject(new CartWidgetSource()); VolumeController.Inject(new VolumeSource()); ContactsController.Inject(new ContactsSourceStandIn()); MyOrdersController.Inject(new MyOrdersSource()); }
// Use this for initialization void Start() { System = GameObject.Find("System"); Applications = GameObject.Find("Applications"); Hacking = GameObject.Find("Hacking"); Other = GameObject.Find("Other"); Computer = GameObject.Find("Computer"); Prompts = GameObject.Find("Prompts"); WindowHandel = GameObject.Find("WindowHandel"); QA = GameObject.Find("QA"); winman = WindowHandel.GetComponent <WindowManager>(); history = Computer.GetComponent <SiteList>(); websecviewer = Computer.GetComponent <WebSecViewer>(); qa = QA.GetComponent <BugReport>(); //DESKTOP ENVIROMENT customtheme = Computer.GetComponent <CustomTheme>(); startmenu = System.GetComponent <AppMenu>(); rezprompt = Prompts.GetComponent <RezPrompt>(); desktop = System.GetComponent <Desktop>(); vc = System.GetComponent <VolumeController>(); //HACKING SOFTWARE pro = Hacking.GetComponent <Progtive>(); trace = Hacking.GetComponent <Tracer>(); dirsearch = Hacking.GetComponent <DirSearch>(); dicCrk = Hacking.GetComponent <DicCrk>(); passwordcracker = Hacking.GetComponent <PasswordCracker>(); dirsearch = Hacking.GetComponent <DirSearch>(); //STOCK SYSTEMS // port = Applications.GetComponent<Portfolio>(); // shareprompt = Prompts.GetComponent<SharePrompt>(); //OTHER PROMPTS purchaseprompt = Prompts.GetComponent <PurchasePrompt>(); //SYSTEM PROMPTS errorprompt = Prompts.GetComponent <ErrorProm>(); shutdownprompt = Prompts.GetComponent <ShutdownProm>(); installprompt = Prompts.GetComponent <InstallPrompt>(); //SYSTEM SOFTWARE sysclock = System.GetComponent <Clock>(); cli = System.GetComponent <CLI>(); cliv2 = System.GetComponent <CLIV2>(); os = System.GetComponent <OS>(); systempanel = System.GetComponent <SystemPanel>(); tasks = System.GetComponent <TaskViewer>(); com = System.GetComponent <Computer>(); diskman = System.GetComponent <DiskMan>(); vv = System.GetComponent <VersionViewer>(); fp = System.GetComponent <FileExplorer>(); SRM = System.GetComponent <SystemResourceManager>(); boot = System.GetComponent <Boot>(); deviceman = System.GetComponent <DeviceManager>(); executor = System.GetComponent <Executor>(); gatewayviewer = System.GetComponent <GatewayViewer>(); //LEGAL APPLICATIONS email = Applications.GetComponent <EmailClient>(); caluclator = Applications.GetComponent <Calculator>(); notepad = Applications.GetComponent <Notepad>(); notepadv2 = Applications.GetComponent <Notepadv2>(); accountlogs = Applications.GetComponent <AccLog>(); mp = Applications.GetComponent <MusicPlayer>(); treeview = Applications.GetComponent <TreeView>(); nv = Applications.GetComponent <NotificationViewer>(); pv = Applications.GetComponent <PlanViewer>(); calendar = Applications.GetComponent <Calendar>(); calendarv2 = Applications.GetComponent <CalendarV2>(); eventview = Applications.GetComponent <EventViewer>(); exchangeviewer = Applications.GetComponent <ExchangeViewer>(); //INTERNET BROWSERS internetbrowser = Applications.GetComponent <InternetBrowser>(); edgebrowser = Applications.GetComponent <NetViewer>(); firefoxbrowser = Applications.GetComponent <Firefox>(); //APPLICATIONS systemMap = Applications.GetComponent <SystemMap>(); textreader = Applications.GetComponent <TextReader>(); //BROWSER STUFF history = Computer.GetComponent <SiteList>(); //OTHER CONNECTION DEVICE rv = Applications.GetComponent <RemoteView>(); vmd = Other.GetComponent <VMDesigner>(); }
void Awake() { volumeController = this.gameObject.GetComponent<VolumeController>(); }
// Start is called before the first frame update void Start() { src = GetComponent <AudioSource>(); src.volume = VolumeController.GetPreferredVolume(channel); }
/// <summary> /// Initialization function for the AlphaPanelHandler. /// </summary> void Start() { // Set up the reference to the VolumeController volumeController = (VolumeController)GameObject.Find("VolumeController").GetComponent(typeof(VolumeController)); }