// Start is called before the first frame update void Start() { _hintbox = HintBox.instance; InitialPos = Center.localPosition; LookTarget = Camera.main.transform; hintSound = GetComponent <AudioSource>(); }
public static void Load() { try { Log.Info("LifeCycle.Load() called"); Log.Info("testing stack trace:\n" + Environment.StackTrace, false); NetworkExtensionManager.Instance.OnLoad(); Log.Info($"Scene={Scene} LoadMode={Mode}"); if (Scene != "AssetEditor") { Log.Info("Applying in game patches"); HarmonyUtil.InstallHarmony <InGamePatchAttribute>(HARMONY_ID); } else { Log.Info("Applying all patches"); HarmonyUtil.InstallHarmony(HARMONY_ID, forbidden: typeof(PreloadPatchAttribute)); HintBox.Create(); } NetInfoExtionsion.Ensure_EditedNetInfos(); ObserverDisposable = GeometryManager.Instance.Subscribe(new ARTMPEObsever()); ARTool.Create(); Log.Info("LifeCycle.Load() successfull!"); Log.Flush(); } catch (Exception ex) { Log.Exception(ex); throw ex; } }
public void UpdateHint() { if (!testMode && CurrentPackage != null && CurrentPackage.CurrentTask != null) { HintBox.CreateHint(CurrentPackage.activeTasks[0].GetHint()); } }
public static void Unload() { LogCalled(); ARTool.Release(); ObserverDisposable?.Dispose(); HintBox.Release(); HarmonyUtil.UninstallHarmony(HARMONY_ID); NetworkExtensionManager.RawInstance?.OnUnload(); }
private void Hint_Click(object sender, EventArgs e) { if (Hint.Checked) { HintBox.Show(); HintBox.Text = RequestHint[num]; } else { HintBox.Hide(); } }
public static void CreateHint(string message, bool open = false) { if (hintInstance != null) { if (hintInstance.Text.Equals(message)) { return; } else { hintInstance.DestroyHint(); } } if (boxInstance != null) { boxInstance.message = message; if (Vector3.Distance(boxInstance.transform.position, Player.Camera.transform.position) > maxDistance) { boxInstance.SafeDestroy(); boxInstance = null; } else { Logger.Print("Box exists, returning"); return; } } Init(); Vector3 hintPos = GetHintPosition(); if (open) { CreateHintText(message, hintPos); return; } GameObject newHint = Instantiate(hintPrefab); newHint.transform.position = hintPos; HintBox hint = newHint.GetComponent <HintBox>(); boxInstance = hint; hint.message = message; }
public static void Unload() { try { LogCalled(); UI.Debug.PWSelector.Release(); UI.Debug.PWModifier.Release(); ARTool.Release(); ObserverDisposable?.Dispose(); HintBox.Release(); HarmonyUtil.UninstallHarmony(HARMONY_ID); NetworkExtensionManager.RawInstance?.OnUnload(); }catch (Exception ex) { Log.Exception(ex); } }
protected override void Activate() { TaskBase.CreateGeneralMistake("Vinkkilaatikko avattiin", 1, false); if (ActivateCount > 0) { return; } Logger.Print("Activated"); CreateHintText(message, startPos); grabbed = false; SafeDestroy(); boxInstance = null; }
private void CreateHint(string hint) { HintBox.CreateHint(hint, true); }
protected virtual void Start() { HintBox.Init(true); }
// Use this for initialization void Start() { mainCamera.enabled = true; GameObject guiObject = GameObject.Find("GUI"); hintBox = (HintBox)guiObject.GetComponent("HintBox"); }
//문제 데이터를 초기화 public void clearQustionData() { QuetionBox.Clear(); HintBox.Clear(); }
private void Awake() { instance = this; }
private void RequestBox_Load(object sender, EventArgs e) { HintBox.Hide(); }