// Start is called before the first frame update void Start() { control_turn = controlTrun.GetComponent <ControlTrun>(); control_bar = controlBar.GetComponent <ControlBar>(); make_chara = makeChara.GetComponent <MakeChar>(); chara_ob = make_chara.chara_ob; charas = make_chara.charas; enemy_ob = make_chara.enemy_ob; enemies = make_chara.enemies; time_all = (charas[0].getTime() + charas[1].getTime() + charas[2].getTime()); audioSource = GetComponent <AudioSource>(); }
public void OnOpening(object enterInformation) { var graphicsDeviceManager = GameInstance.GetService <GraphicsDeviceManager>(); graphicsDeviceManager.PreferMultiSampling = true; graphicsDeviceManager.ApplyChanges(); _mainOverlay = new UiOverlay(); var translation = GameInstance.GetService <TranslationProvider>(); _mainOverlay.AddElement(new HexagonBackground()); _mainOverlay.AddElement(new LeftSideButton(translation.CreateValue("System", "StartNewGame"), new Vector2(26, 45), OnStartNewGame)); _mainOverlay.AddElement(new LeftSideButton(translation.CreateValue("System", "LoadGame"), new Vector2(26, 107), OnLoadGame)); _mainOverlay.AddElement(new LeftSideButton(translation.CreateValue("System", "Gamejolt"), new Vector2(26, 169), null)); _mainOverlay.AddElement(new LeftSideButton(translation.CreateValue("System", "Options"), new Vector2(26, 231), null)); _mainOverlay.AddElement(new LeftSideButton(translation.CreateValue("System", "QuitGame"), new Vector2(26, 293), OnExitGame)); _mainOverlay.AddInputController(new KeyboardUiInputController()); _mainOverlay.AutoEnumerateTabIndices(); _closeDialog = new SelectionDialog(translation.CreateValue("System", "ReallyQuitGameQuestion"), translation.CreateValue("System", "UnsavedChangesLost"), new[] { new LeftSideButton(translation.CreateValue("System", "No"), new Vector2(50, 50), b => { _mainOverlay.CloseModal(); }), new LeftSideButton(translation.CreateValue("System", "Yes"), new Vector2(50, 100), b => { GameInstance.GetService <ScreenManager>().NotifyQuitGame(); }) }); var bar = new ControlBar(); bar.AddEntry(translation.CreateValue("System", "Select"), Buttons.A, Keys.Enter); _mainOverlay.AddElement(bar); _mainOverlay.Show(); }
// Use this for initialization void Start() { wordStatus = 1; WordCreat002 = GameObject.Find("WordCreat"); WTest002 = WordCreat002.GetComponent<WordTest>(); W_Timecount = GameObject.Find("TimeCount"); W_timetest = W_Timecount.GetComponent<TimeTest>(); ControlBridge = GameObject.Find("控制橋"); controlbar01 = ControlBridge.GetComponent<ControlBar>(); testWordChild = this.gameObject.GetComponentInChildren<testWordObj>(); }
internal Updater(ControlBar outerInstance, string instanceId, DeviceActionsLayoutData data) { this.outerInstance = outerInstance; this.mInstanceId = instanceId; this.mData = data; }
private void glControl1_Load(object sender, EventArgs e) { OpenGLConnection = new OpenGLConnection(); try { splashForm.Hide(); splashForm.Show(); splashForm.TopMost = true; OpenGLConnection.OnLoad(glControl1, Form1.debugLogger); InitGUI(); var slicer_connection = (SlicerConnectionBase) new M3D.Slicer.Cura15_04.SlicerConnectionCura(Paths.WorkingFolder, Paths.ResourceFolder); model_loading_manager = new ModelLoadingManager(); spooler_connection = new SpoolerConnection(messagebox, informationbox, settingsManager); SoftwareUpdater = new Updater(this, messagebox, spooler_connection, settingsManager); controlbar = new ControlBar(this, m_gui_host, settingsManager, messagebox, informationbox, spooler_connection, model_loading_manager, SoftwareUpdater); var frame = new Frame(24680); frame.SetPosition(0, 0); frame.RelativeWidth = 1f; frame.RelativeHeight = 1f; frame.BGColor = new Color4(0.913725f, 0.905882f, 0.9098f, 1f); m_gui_host.AddElement(frame); libraryview = new LibraryView(10001, frame, glControl1, m_gui_host, informationbox, model_loading_manager); m_gui_host.SetFocus(1001); m_gui_host.Refresh(); Form1.debugLogger.Add("glControl1_Load()", "LibraryView created.", DebugLogger.LogType.Secondary); printerView = new PrinterView(this, m_gui_host, OpenGLConnection, spooler_connection, slicer_connection, model_loading_manager, messagebox, informationbox, settingsManager, libraryview); printerView.SetViewPointPos(0.0f, 100f, 400f); Form1.debugLogger.Add("glControl1_Load()", "GLPrinterView created.", DebugLogger.LogType.Secondary); frame.AddChildElement(printerView); frame.AddChildElement(libraryview); Form1.debugLogger.Add("glControl1_Load()", "Views added to background view.", DebugLogger.LogType.Secondary); model_loading_manager.Init(settingsManager, libraryview, printerView, messagebox, informationbox); Form1.debugLogger.Add("glControl1_Load()", "Model Loading Manager Initialized.", DebugLogger.LogType.Secondary); printer_status_dialog_organizer = new PrinterStatusDialogOrganizer(spooler_connection, model_loading_manager, settingsManager, this, m_gui_host, printerView, messagebox); Form1.debugLogger.Add("glControl1_Load()", "PrinterStatusDialogOrganizer Initialized.", DebugLogger.LogType.Secondary); spooler_connection.SpoolerStartUp(Form1.debugLogger); Form1.debugLogger.Add("glControl1_Load()", "spooler_connection.SpoolerStartUp() completed.", DebugLogger.LogType.Secondary); controlbar.UpdateSettings(); Form1.debugLogger.Add("glControl1_Load()", "controlbar.UpdateSettings() completed.", DebugLogger.LogType.Secondary); if (settingsManager.CurrentAppearanceSettings.StartFullScreen) { WindowState = FormWindowState.Maximized; } else { WindowState = FormWindowState.Normal; } splashForm.Close(); Form1.debugLogger.Add("glControl1_Load()", "splash form closed.", DebugLogger.LogType.Secondary); glControl1.MakeCurrent(); glControl1.VSync = false; Form1.debugLogger.Add("glControl1_Load()", "glcontrol sync", DebugLogger.LogType.Secondary); if (SplashFormFirstRun.WasRunForTheFirstTime) { var welcomeDialog = new WelcomeDialog(1209, messagebox); welcomeDialog.Init(m_gui_host); m_gui_host.GlobalChildDialog += welcomeDialog; } else { messagebox.AllowMessages = true; } Form1.debugLogger.Add("glControl1_Load()", "Welcome Initialized", DebugLogger.LogType.Secondary); CheckFileAssociations(); Form1.debugLogger.Add("glControl1_Load()", "File Associations Checked", DebugLogger.LogType.Secondary); var num = spooler_connection.PrintSpoolerClient.IsPrinting ? 0 : (!Program.runfirst_start ? 1 : 0); SoftwareUpdater.CheckForUpdate(false); Form1.debugLogger.Add("glControl1_Load()", "Checked for updates", DebugLogger.LogType.Secondary); } catch (Exception ex) { ExceptionForm.ShowExceptionForm(ex); } if (args.Length != 0) { model_loading_manager.LoadModelIntoPrinter(args[0]); } FileAssociationSingleInstance.OnNewInstance += new NewInstanceEvent(OnNewInstanceEvent); }