예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     _hintbox   = HintBox.instance;
     InitialPos = Center.localPosition;
     LookTarget = Camera.main.transform;
     hintSound  = GetComponent <AudioSource>();
 }
예제 #2
0
        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;
            }
        }
예제 #3
0
 public void UpdateHint()
 {
     if (!testMode && CurrentPackage != null && CurrentPackage.CurrentTask != null)
     {
         HintBox.CreateHint(CurrentPackage.activeTasks[0].GetHint());
     }
 }
예제 #4
0
 public static void Unload()
 {
     LogCalled();
     ARTool.Release();
     ObserverDisposable?.Dispose();
     HintBox.Release();
     HarmonyUtil.UninstallHarmony(HARMONY_ID);
     NetworkExtensionManager.RawInstance?.OnUnload();
 }
예제 #5
0
 private void Hint_Click(object sender, EventArgs e)
 {
     if (Hint.Checked)
     {
         HintBox.Show();
         HintBox.Text = RequestHint[num];
     }
     else
     {
         HintBox.Hide();
     }
 }
예제 #6
0
    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;
    }
예제 #7
0
 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);
     }
 }
예제 #8
0
    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);
 }
예제 #11
0
 // Use this for initialization
 void Start()
 {
     mainCamera.enabled = true;
     GameObject guiObject = GameObject.Find("GUI");
     hintBox = (HintBox)guiObject.GetComponent("HintBox");
 }
예제 #12
0
파일: Form2.cs 프로젝트: ee0521/Eunsung
 //문제 데이터를 초기화
 public void clearQustionData()
 {
     QuetionBox.Clear();
     HintBox.Clear();
 }
예제 #13
0
 private void Awake()
 {
     instance = this;
 }
예제 #14
0
 private void RequestBox_Load(object sender, EventArgs e)
 {
     HintBox.Hide();
 }