Example #1
0
 void ToggleAdminPanel(TrinaxAdminPanel _aP)
 {
     if (Input.GetKeyDown(KeyCode.F12))
     {
         StartCoroutine(_aP.DoSuccessResult(true));
         _aP.gameObject.SetActive(!_aP.gameObject.activeSelf);
         HideDebugText(!_aP.gameObject.activeSelf);
         if (reporter == null)
         {
             return;
         }
         else
         {
             if (reporter.show)
             {
                 reporter.show = !reporter.show;
             }
         }
     }
     if (Input.GetKeyDown(KeyCode.F10) && _aP.gameObject.activeSelf)
     {
         if (reporter == null)
         {
             return;
         }
         reporter.show = !reporter.show;
         if (reporter.show)
         {
             reporter.doShow();
         }
     }
 }
    async void Start()
    {
        isReady = false;
        await new WaitUntil(() => TrinaxGlobal.Instance.isReady);

        isReady = true;

        aP = TrinaxCanvas.Instance.adminPanel;
    }
Example #3
0
    void ToggleAdminPanel(TrinaxAdminPanel _aP)
    {
        foreach (char c in Input.inputString)
        {
            if ((c == cheat_code_adminPanel[typeIndex] && !_aP.gameObject.activeSelf) || (c == cheat_code_reporter[typeIndex] && !reporter.show))
            {
                typeIndex++;
                typedStr += c;
            }
            else
            {
                typeIndex = 0;
                typedStr  = "";
            }
        }
        if (typeIndex == cheat_code_adminPanel.Length && !_aP.gameObject.activeSelf && typedStr == cheat_code_adminPanel)
        {
            typeIndex = 0;
            typedStr  = "";
            _aP.ShowResultOverlay(true);
            _aP.gameObject.SetActive(!_aP.gameObject.activeSelf);
            //if (reporter == null) return;
            //else
            //{
            //    if (reporter.show)
            //    {
            //        reporter.show = !reporter.show;
            //    }
            //}
        }

        if (typeIndex == cheat_code_reporter.Length && !reporter.show && typedStr == cheat_code_reporter)
        {
            typeIndex = 0;
            typedStr  = "";
            if (reporter == null)
            {
                return;
            }
            reporter.show = !reporter.show;
            if (reporter.show)
            {
                reporter.doShow();
            }
        }
        //if (Input.GetKeyDown(KeyCode.F9) /*&& _aP.gameObject.activeSelf*/)
        //{
        //    if (reporter == null) return;
        //    reporter.show = !reporter.show;
        //    if (reporter.show)
        //    {
        //        reporter.doShow();
        //    }
        //}
    }
 private void SetComponentReferences()
 {
     aP = TrinaxManager.trinaxCanvas.adminPanel;
     //if(aP != null)
     //{
     //    if (!aP.gameObject.activeSelf)
     //    {
     //        aP.gameObject.SetActive(true);
     //    }
     //}
     managers = GetComponentsInChildren <IManager>();
 }
    // Set necessary component references
    void SetComponentReferences()
    {
        loadedComponentReferences = false;
        trinaxSaveManager         = GetComponentInChildren <TrinaxSaveManager>();
        trinaxAudioManager        = GetComponentInChildren <TrinaxAudioManager>();
        trinaxAsyncServerManager  = GetComponentInChildren <TrinaxAsyncServerManager>();
        trinaxCanvas          = GetComponentInChildren <TrinaxCanvas>();
        trinaxKeyboardManager = GetComponentInChildren <TrinaxKeyboardManager>();

        aP = trinaxCanvas.adminPanel;

        loadedComponentReferences = true;
    }