Esempio n. 1
0
        void Awake()
        {
            HotReload.Register(this);
            if (HotReload.IsHotReload)
            {
                return;
            }

            _strBuilder = new StringBuilder();

            _strColorAssert    = ColorUtility.ToHtmlStringRGBA(_assertColor);
            _strColorError     = ColorUtility.ToHtmlStringRGBA(_errorColor);
            _strColorException = ColorUtility.ToHtmlStringRGBA(_exceptionColor);
            _strColorWarning   = ColorUtility.ToHtmlStringRGBA(_warningColor);

            _text.color = _logColor;

            if (_displayOnStartup)
            {
                show();
            }
            else
            {
                hide();
            }
        }
Esempio n. 2
0
        void Awake()
        {
            HotReload.Register(this);

            _pipeIn  = new PipeIn();
            _pipeOut = new PipeOut();

#if UNITY_STANDALONE_WIN
            _pipeInAbsolutePath  = @"\\.\pipe\" + _pipeInName + Shell.Main.ID;
            _pipeOutAbsolutePath = @"\\.\pipe\" + _pipeOutName + Shell.Main.ID;
#else
            _pipeInAbsolutePath  = Application.dataPath + "/../" + _pipeInName + Shell.Main.ID;
            _pipeOutAbsolutePath = Application.dataPath + "/../" + _pipeOutName + Shell.Main.ID;
#endif
        }
Esempio n. 3
0
        void Awake()
        {
            HotReload.Register(this);

            if (_instance != null)
            {
                Destroy(this.gameObject);
                return;
            }

            _instance = this;
            if (this.transform.parent != null)
            {
                this.transform.SetParent(null);
            }
            DontDestroyOnLoad(this.gameObject);

            Shell.Main.RegisterCmd("quit", this, false);
            Shell.Main.RegisterCmd("debug", this, false);
            Shell.Main.RegisterCmd("path", this, false);
            Shell.Main.RegisterCmd("ppref", this, false);
            Shell.Main.RegisterCmd("beep", this, false);
            Shell.Main.RegisterCmd("volume", this, false);
            Shell.Main.RegisterCmd("lds", this, false);
            Shell.Main.RegisterCmd("fps", this, false);
            Shell.Main.RegisterCmd("screen", this, false);
            Shell.Main.RegisterCmd("ping", this, false);
            Shell.Main.RegisterCmd("screenshot", this, false);
            Shell.Main.RegisterCmd("auth", this, false);
            Shell.Main.RegisterCmd("time", this, false);
            Shell.Main.RegisterCmd("mic", this, false);
            Shell.Main.RegisterCmd("cursor", this, false);
            Shell.Main.RegisterCmd("webcam", this, false);
            Shell.Main.RegisterCmd("tier", this, false);
            Shell.Main.RegisterCmd("restart", this, false);

            _lastTime = DateTime.Now;
        }
Esempio n. 4
0
        void Awake()
        {
            HotReload.Register(this);

            if (_instance != null)
            {
                Destroy(this.gameObject);
                return;
            }

            _instance = this;
            if (this.transform.parent != null)
            {
                this.transform.SetParent(null);
            }
            DontDestroyOnLoad(this.gameObject);

            Shell.Main.RegisterCmd("keycode", this, false);
            Shell.Main.RegisterCmd("bind", this, false);
            Shell.Main.RegisterCmd("unbind", this, false);

            if (!HotReload.IsHotReload)
            {
                _keyCodes = new List <KeyCode>();
                _commands = new List <string>();

                if (_defaultKeyCodes != null && _defaultCommands != null)
                {
                    int length = Mathf.Min(_defaultKeyCodes.Length, _defaultCommands.Length);
                    for (int i = 0; i < length; i++)
                    {
                        _keyCodes.Add(_defaultKeyCodes[i]);
                        _commands.Add(_defaultCommands[i]);
                    }
                }
            }
        }
Esempio n. 5
0
 public App()
 {
     HotReload.Register();
     InitializeComponent();
     MainPage = new NavigationPage(new MainPage());
 }