Exemplo n.º 1
0
        public override bool Initialise()
        {
            var fileName = $"{DirectoryFullName}\\IgnoreCellSetting.json";

            if (!File.Exists(fileName))
            {
                var arr = JsonConvert.SerializeObject(_invArr).Replace("],[", $"],{Environment.NewLine} [");
                File.WriteAllText(fileName, arr);
            }

            string json = File.ReadAllText(fileName);

            _invArr = JsonConvert.DeserializeObject <int[, ]>(json);

            ReadAdvancedFilterFile();

            UGraphics = Graphics;

            Input.RegisterKey(Settings.MoveKey);
            Settings.MoveKey.OnValueChanged += () => { Input.RegisterKey(Settings.MoveKey); };

            Input.RegisterKey(Settings.ChaosKey);
            Settings.ChaosKey.OnValueChanged += () => { Input.RegisterKey(Settings.ChaosKey); };

            return(true);

            //InitCoroutine();
            //SetupOrClose();
            //MenuPlugin.KeyboardMouseEvents.MouseDownExt += KeyboardMouseEvents_MouseDownExt;
            //MenuPlugin.KeyboardMouseEvents.MouseUpExt += KeyboardMouseEvents_MouseUpExt;
            //MenuPlugin.KeyboardMouseEvents.MouseMoveExt += KeyboardMouseEvents_MouseMove;
        }