Beispiel #1
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                yield break;
            }

            var request = new Request <AskOffset>();

            yield return(context.UserRequest.Request(request, "Selection Based Degree Offset"));

            if (!request.Succeed)
            {
                yield break;
            }

            var result           = request.Object;
            var operationManager = context.OperationManager;

            foreach (var tapNote in operationManager.SelectedTapNote)
            {
                var newDegree = tapNote.Degree + result.Degree;
                operationManager.SetTapNoteDegree(tapNote, newDegree, false);
            }

            foreach (var holdNote in operationManager.SelectedHoldNote)
            {
                var newDegree = holdNote.Degree + result.Degree;
                operationManager.SetHoldNoteDegree(holdNote, newDegree, false);
            }
        }
Beispiel #2
0
        public IEnumerator Process(LanotaliumContext context)
        {
            Request <VolumeContext> r = new Request <VolumeContext>();

            yield return(context.UserRequest.Request(r, "Volume Master"));

            if (r.Succeed)
            {
                var o = r.Object;
                VolumeData.VoClick = o.voClick;
                VolumeData.VoFlick = o.voFlick;
                VolumeData.VoRail  = o.voRail;
                VolumeData.VoMusic = o.voMusic;

                var config = new AutorunConfig()
                {
                    voClick = o.voClick,
                    voFlick = o.voFlick,
                    voMusic = o.voMusic,
                    voRail  = o.voRail
                };
                var content = JsonConvert.SerializeObject(config);
                File.WriteAllText(PathUtil.GetConfigPath("VolumeMaster"), content);
            }
        }
Beispiel #3
0
        public IEnumerator Autorun_Awake(string configPath, LanotaliumContext context)
        {
            if (File.Exists(configPath))
            {
                try
                {
                    var content = File.ReadAllText(configPath);
                    var config  = JsonConvert.DeserializeObject <AutorunConfig>(content);
                    if (config != null)
                    {
                        VolumeData.VoClick = config.voClick;
                        VolumeData.VoFlick = config.voFlick;
                        VolumeData.VoRail  = config.voRail;
                        VolumeData.VoMusic = config.voMusic;
                    }
                }
                catch
                {
                }
            }
            else
            {
                var content = JsonConvert.SerializeObject(new AutorunConfig());
                File.WriteAllText(configPath, content);
            }

            yield return(null);
        }
Beispiel #4
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                context.MessageBox.ShowMessage("You must load the project first");
            }
            else
            {
                Request <AskForSkin> request = new Request <AskForSkin>();
                yield return(context.UserRequest.Request(request, "Tuner Setting"));

                if (request.Succeed)
                {
                    var       r         = request.Object;
                    var       directory = Path.Combine(Application.streamingAssetsPath, String.Format("TunerSkin/{0}", r.Name));
                    TunerSkin skin;
                    if ((skin = TunerSkin.LoadFromDirectory(directory)) != null)
                    {
                        var Background = GameObject.Find("Tuner/Background");
                        var Border     = GameObject.Find("Tuner/Border");
                        var JudgeLine  = GameObject.Find("Tuner/JudgeLine");
                        var Arrow      = GameObject.Find("Tuner/Arrow");
                        var Core       = GameObject.Find("Tuner/Core");

                        Background.GetComponent <SpriteRenderer>().color  = new Color(1, 1, 1, r.Alpha);
                        Background.GetComponent <SpriteRenderer>().sprite = skin.DefaultSprite.Backgroud;
                        Border.GetComponent <SpriteRenderer>().sprite     = skin.DefaultSprite.Border;
                        Core.GetComponent <SpriteRenderer>().sprite       = skin.DefaultSprite.Core;
                        Arrow.GetComponent <SpriteRenderer>().sprite      = skin.DefaultSprite.Arrow;
                        JudgeLine.GetComponent <SpriteRenderer>().sprite  = skin.DefaultSprite.Judgeline;
                    }
                }
            }
            yield return(null);
        }
Beispiel #5
0
        public IEnumerator Process(LanotaliumContext context)
        {
            var rtRequest = new RuntimeRequest(context.UserRequest);

            rtRequest.CreateField("ValueOne", "Int Value : 1", RequestFieldType.Int);
            rtRequest.CreateField("ValueTwo", "Int Value : 2", RequestFieldType.Int).SetRange(-5, 5);
            rtRequest.CreateField("ValueThree", "Float Value : 3", RequestFieldType.Float).SetRange(-10, 10).SetDefaultValue(5.0f);
            rtRequest.CreateField("ValueFour", "Bool Value : 4", RequestFieldType.Bool);
            rtRequest.CreateField("ValueFive", "String Value : 5", RequestFieldType.String);
            yield return(rtRequest.Request());

            if (rtRequest.Result.Success)
            {
                context.MessageBox.ShowMessage("Success!");

                int    i1 = (int)rtRequest.Result.ReadField("ValueOne");
                int    i2 = (int)rtRequest.Result.ReadField("ValueTwo");
                float  f1 = (float)rtRequest.Result.ReadField("ValueThree");
                bool   b1 = (bool)rtRequest.Result.ReadField("ValueFour");
                string s1 = (string)rtRequest.Result.ReadField("ValueFive");

                context.MessageBox.ShowMessage(string.Join("\n", i1, i2, f1, b1, s1));
            }
            else
            {
                context.MessageBox.ShowMessage("Failed!");
            }
        }
        public IEnumerator Process(LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                yield break;
            }

            var request = new Request <AskForLinear>();

            yield return(context.UserRequest.Request(request, "Linear Motion Creation"));

            if (!request.Succeed)
            {
                yield break;
            }

            var result = request.Object;
            var polar  = CoordMath.ToPolar(new Vector2(result.X, result.Y));

            //8 cir 11 linear
            //0 deg 1 radius

            var camera = new LanotaCameraXZ()
            {
                Time = context.TunerManager.ChartTime,
                Type = 11,
                ctp  = polar.y,
                ctp1 = polar.x
            };

            context.OperationManager.AddHorizontal(camera);

            yield return(null);
        }
Beispiel #7
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                yield break;
            }

            Request <AskForGuide> request = new Request <AskForGuide>();

            yield return(context.UserRequest.Request(request, "Line Setting"));

            if (!request.Succeed)
            {
                yield break;
            }

            var result = request.Object;

            GuidelineResources resource = null;
            var resourcePath            = Application.streamingAssetsPath + "/Assets/screenlineguides";

            yield return(ResourceBundle.LoadFromBundle <GuidelineResources>(resourcePath, x => resource = x));

            var tunerManager = context.TunerManager.gameObject;

            if (tunerManager == null)
            {
                yield break;
            }

            var mgr = ExternalBehaviour <GuidelineManager> .Get(
                "ScreenGuideManager",
                resource.Prefab_ScreenSpace,
                tunerManager,
                out bool hasCreated
                );

            mgr.TunerObject     = GameObject.Find("Tuner");
            mgr.TunerDot_Prefab = resource.Prefab_Dot;

            mgr.GetComponent <Canvas>().worldCamera = GameObject.Find("LimTunerCamera").GetComponent <Camera>();

            if (hasCreated)
            {
                mgr.Init();
            }

            if (!result.Hide)
            {
                mgr.Show();
                mgr.SetCounts(result.VerticalCount, result.HorizontalCount);
                mgr.SetColor(ColorUtil.FromInt(result.ColorR, result.ColorG, result.ColorB, result.ColorA));
            }
            else
            {
                mgr.Hide();
            }

            yield return(true);
        }
        public IEnumerator Process(LanotaliumContext context)
        {
            GameObject manager;

            if ((manager = GameObject.Find("ChartEventHandler")) == null)
            {
                GameObject.Destroy(manager);
            }

            manager = new GameObject("ChartEventHandler");
            manager.AddComponent <ChartEventManager>();
            manager.GetComponent <ChartEventManager>().context = context;

            foreach (var file in Directory.GetFiles(Application.dataPath + "/StreamingAssets/Plugins"))
            {
                Assembly assembly = Assembly.LoadFrom(file);
                Type[]   types    = assembly.GetTypes();
                foreach (var type in types)
                {
                    if (type.GetInterface("IBpmEvent") != null)
                    {
                        IBpmEvent e = Activator.CreateInstance(type) as IBpmEvent;
                        manager.GetComponent <ChartEventManager>().EventBpm.Add(e);
                    }
                }
            }

            manager.SetActive(true);
            yield return(null);
        }
Beispiel #9
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (context.IsProjectLoaded)
            {
                context.EditorManager.TimeLineWindow.WaveformManager.OnMusicLoaded();
            }

            yield return(null);
        }
Beispiel #10
0
        public IEnumerator Process(LanotaliumContext context)
        {
            Request <ParticleManagerPreferences> r = new Request <ParticleManagerPreferences>();

            yield return(context.UserRequest.Request(r, "Preferences Window"));

            if (r.Succeed)
            {
                Manager.Setting(r.Object);
            }
            yield return(null);
        }
Beispiel #11
0
        public IEnumerator Process(LanotaliumContext context)
        {
            var manager = Manager.Create(context);

            var Bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "Assets/lanotaparticle"));

            if (Bundle != null)
            {
                manager.GetComponent <ParticleManager>().PrefabHoldSparkle = Bundle.LoadAsset <GameObject>("Assets/Particle/HoldNoteSparkle.prefab");
            }
            yield return(null);
        }
Beispiel #12
0
        //Show Preferences Window
        public IEnumerator ShowPreferences(LanotaliumContext context)
        {
            Request <Preferences> request = new Request <Preferences>();

            yield return(context.UserRequest.Request(request, "Preferences"));

            if (request.Succeed)
            {
                UseSoundEffect        = request.Object.UseSoundEffect;
                CopyPasteNotification = request.Object.CopyPasteNotification;
            }
        }
        public IEnumerator Process(LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                context.MessageBox.ShowMessage("You must load the project first");
            }
            else
            {
                yield return(InitResources(context));

                if (!IsLanotaThemeLoaded()) //Default skin
                {
                    Request <AskForHeaderSetting> request = new Request <AskForHeaderSetting>();
                    yield return(context.UserRequest.Request(request, "Header Setting"));

                    if (request.Succeed)
                    {
                        var r = request.Object;
                        if (r.LanotaHeader)
                        {
                            Header.GetComponent <Image>().color = Color.gray;
                            Request <AskForLanotaSetting> request2 = new Request <AskForLanotaSetting>();
                            yield return(context.UserRequest.Request(request2, "Lanota Theme Header Setting"));

                            if (request2.Succeed)
                            {
                                context.EditorManager.TunerWindow.DisplayManager.FullScreenTuner = true;
                                InitLanotaTheme(request2.Object);
                                context.EditorManager.TunerWindow.DisplayManager.FullScreenTuner = false;
                            }
                        }
                    }
                }
                else //Lanota Skin
                {
                    Request <AskForLanotaSetting> request2 = new Request <AskForLanotaSetting>();
                    yield return(context.UserRequest.Request(request2, "Edit Lanota Theme Header Setting"));

                    if (request2.Succeed)
                    {
                        context.EditorManager.TunerWindow.DisplayManager.FullScreenTuner = true;
                        InitLanotaTheme(request2.Object, false);
                        context.EditorManager.TunerWindow.DisplayManager.FullScreenTuner = false;
                    }
                }
                yield return(null);
            }
        }
Beispiel #14
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (context.IsProjectLoaded)
            {
                Request <AskForParticleSetting> request = new Request <AskForParticleSetting>();
                yield return(context.UserRequest.Request(request, "Particle Setting"));

                if (request.Succeed)
                {
                    GameObject      i   = null;
                    ParticleManager mgr = null;
                    if ((i = GameObject.Find("ParticleManagerObject")) == null)
                    {
                        var r = new Resources.ParticleResources();

                        yield return(ResourceBundle.LoadFromBundle <Resources.ParticleResources>(Application.streamingAssetsPath + "/Assets/uitweak/uitweak.particle", x => r = x));

                        ComboTextControl.kazo = r.Font_Kawoszeh;

                        i      = new GameObject();
                        i.name = "ParticleManagerObject";
                        i.AddComponent <ParticleManager>();
                        mgr       = i.GetComponent <ParticleManager>();
                        mgr.r     = r;
                        mgr.c     = context;
                        mgr.Tuner = GameObject.Find("LimTunerManager/Tuner");

                        var combo = GameObject.Instantiate(r.Prefab_ComboTextCluster, mgr.Tuner.transform, false);
                        mgr.ComboText_0   = combo.transform.Find("0").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_45  = combo.transform.Find("45").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_90  = combo.transform.Find("90").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_135 = combo.transform.Find("135").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_180 = combo.transform.Find("180").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_225 = combo.transform.Find("225").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_270 = combo.transform.Find("270").gameObject.AddComponent <ComboTextControl>();
                        mgr.ComboText_315 = combo.transform.Find("315").gameObject.AddComponent <ComboTextControl>();
                    }
                    else
                    {
                        mgr = i.GetComponent <ParticleManager>();
                    }

                    mgr.UseNoteParticle = request.Object.UseClickParticle;
                    mgr.UseComboCounter = request.Object.UseComboCount;
                }
            }
            yield return(null);
        }
Beispiel #15
0
        public IEnumerator Process(LanotaliumContext context)
        {
            Request <LinestyleContext> r = new Request <LinestyleContext>();

            yield return(context.UserRequest.Request(r, "Beatline Style"));

            if (r.Succeed)
            {
                var BeatlinePrefab = context.EditorManager.InspectorWindow.ComponentBpm.BeatlinePrefab;
                var BeatlineMat    = BeatlinePrefab.GetComponent <LineRenderer>().material;

                var o = r.Object;
                Util.ApplyLineWidth(BeatlinePrefab, "BeatlinePrefab(Clone)", o.Width);
                Util.ApplyColorToMaterial(BeatlineMat, new Color(o.R, o.G, o.B, 1.0f), "BeatlinePrefab(Clone)");
            }
        }
Beispiel #16
0
        public IEnumerator Process(LanotaliumContext context)
        {
            Request <AlphaContext> r = new Request <AlphaContext>();

            yield return(context.UserRequest.Request(r, "Alpha Master"));

            if (r.Succeed)
            {
                var o = r.Object;
                AlphaBackground = new Color(1.0f, 1.0f, 1.0f, o.aBG);
                AlphaBorder     = new Color(1.0f, 1.0f, 1.0f, o.aBorder);
                AlphaArrow      = new Color(1.0f, 1.0f, 1.0f, o.aArrow);
                AlphaCore       = new Color(1.0f, 1.0f, 1.0f, o.aCore);
                AlphaJudgeLine  = new Color(1.0f, 1.0f, 1.0f, o.aJudge);
            }
        }
Beispiel #17
0
        //Show Special Paste Window
        public IEnumerator ShowSpecialPaste(LanotaliumContext context)
        {
            Request <SpecialPaste> request = new Request <SpecialPaste>();

            yield return(context.UserRequest.Request(request, "Special Paste"));

            if (request.Succeed)
            {
                var   result = request.Object;
                float time   = context.EditorManager.MusicPlayerWindow.CurrentTime;
                for (int i = 1; i <= result.Count; i++)
                {
                    yield return(PasteAll(context, time + (result.TimeOffset * (i - 1)), result.DegEach? result.DegOffset * i: result.DegOffset, (float)Math.Pow(result.RadiusMultiply, i)));
                }
            }
        }
Beispiel #18
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                yield break;
            }

            var obj = GameObject.Find("FixAll");

            if (obj != null)
            {
                var button = obj.GetComponent <Button>();
                button.interactable = !button.interactable;
            }

            yield return(null);
        }
Beispiel #19
0
        public IEnumerator CopyAll(LanotaliumContext context)
        {
            taps.Clear();
            holds.Clear();
            motions.Clear();
            timing_fastest = 999999999.0f;

            int i = 0, ii = 0, iii = 0;

            foreach (var note in context.OperationManager.SelectedTapNote.ToArray())
            {
                i++;
                taps.Add(note);
                if (note.Time < timing_fastest)
                {
                    timing_fastest = note.Time;
                }
                context.OperationManager.DeSelectTapNote(note);
            }
            foreach (var note in context.OperationManager.SelectedHoldNote.ToArray())
            {
                ii++;
                holds.Add(note);
                if (note.Time < timing_fastest)
                {
                    timing_fastest = note.Time;
                }
                context.OperationManager.DeSelectHoldNote(note);
            }
            foreach (var motion in context.OperationManager.SelectedMotions.ToArray())
            {
                iii++;
                motions.Add(motion);
                if (motion.Time < timing_fastest)
                {
                    timing_fastest = motion.Time;
                }
                context.OperationManager.DeSelectMotion(motion);
            }

            if (CopyPasteNotification)
            {
                context.MessageBox.ShowMessage(String.Format("[Ctrl+CV] Copied!\nTap Notes: {0}\nHold Notes: {1}\nMotions: {2}", i, ii, iii));
            }
            yield return(null);
        }
Beispiel #20
0
        public IEnumerator Process(LanotaliumContext context)
        {
            InterfaceCreatorManager creator = new InterfaceCreatorManager();
            InterfaceHotKeyManager  hotkey  = new InterfaceHotKeyManager();

            //Load Menu Associated plugins
            foreach (var file in Directory.GetFiles(Application.dataPath + "/StreamingAssets/Plugins"))
            {
                Assembly assembly = Assembly.LoadFrom(file);
                Type[]   types    = assembly.GetTypes();
                foreach (var type in types)
                {
                    //Creator Buttons
                    if (type.GetInterface("ICreatorButton") != null)
                    {
                        ICreatorButton button = Activator.CreateInstance(type) as ICreatorButton;
                        creator.AddButton(button);
                    }
                    else if (type.GetInterface("ICreatorButtonHotKey") != null)
                    {
                        ICreatorButtonHotKey button = Activator.CreateInstance(type) as ICreatorButtonHotKey;
                        creator.AddButton(button);
                    }
                    else if (type.GetInterface("ICreatorButtonNumber") != null)
                    {
                        ICreatorButtonNumber button = Activator.CreateInstance(type) as ICreatorButtonNumber;
                        creator.AddButton(button);
                    }

                    if (type.GetInterface("IHotKey") != null)
                    {
                        IHotKey key = Activator.CreateInstance(type) as IHotKey;
                    }

                    creator.UpdateUI();
                }
            }



            while (true)
            {
                yield return(null);
            }
        }
Beispiel #21
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (context.IsProjectLoaded)
            {
                var judgeline = GameObject.Find("Tuner/JudgeLine");
                if (judgeline != null && GameObject.Find("JudgelineGlow") == null)
                {
                    var r = new Resources.OrnamentResources();
                    yield return(ResourceBundle.LoadFromBundle <Resources.OrnamentResources>(Application.streamingAssetsPath + "/Assets/uitweak/uitweak.screen", x => r = x));

                    GameObject.Instantiate(r.Prefab_JudgeGlow, judgeline.transform).AddComponent <GlowManager>().c = context;
                    var glow = GameObject.Instantiate(r.Prefab_JudgeOrnament, judgeline.transform);
                    glow.name = "JudgelineGlow";
                }
            }

            yield return(null);
        }
Beispiel #22
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (context.IsProjectLoaded)
            {
                Request <AskForGuide> request = new Request <AskForGuide>();
                yield return(context.UserRequest.Request(request, "Guide Setting"));

                if (request.Succeed)
                {
                    GameObject            i   = null;
                    AnglelineGuideManager mgr = null;
                    AnglelineResources    r   = null;
                    yield return(ResourceBundle.LoadFromBundle <AnglelineResources>(Application.streamingAssetsPath + "/Assets/anglelineguide", x => r = x));

                    if ((i = GameObject.Find("AnglelineGuideManagerObject")) == null)
                    {
                        i      = new GameObject();
                        i.name = "AnglelineGuideManagerObject";
                        i.transform.SetParent(GameObject.Find("Tuner").transform);
                        mgr              = i.AddComponent <AnglelineGuideManager>();
                        mgr.Tuner        = context.TunerManager;
                        mgr.TunerObject  = GameObject.Find("Tuner");
                        mgr.InTextGuide  = r.Prefab_InTextGuide;
                        mgr.OutTextGuide = r.Prefab_OutTextGuide;
                    }
                    else
                    {
                        mgr = i.GetComponent <AnglelineGuideManager>();
                    }
                    try
                    {
                        mgr.SetFormatText(request.Object.GuideString, request.Object.OutText);
                    }
                    catch (FormatException e)
                    {
                        context.MessageBox.ShowMessage("There is something wrong in format string.\nReason: " + e.Message);
                    }
                    catch (DivideByZeroException)
                    {
                        context.MessageBox.ShowMessage("There is something wrong in format string.\nReason: Can not divide by Zero");
                    }
                }
            }
        }
Beispiel #23
0
        public IEnumerator OnLoaded(string configPath, LanotaliumContext context)
        {
            if (!context.IsProjectLoaded)
            {
                yield break;
            }

            var objects = Resources.FindObjectsOfTypeAll <Button>();

            foreach (var obj in objects)
            {
                if (obj.gameObject.name.Equals("FixAll"))
                {
                    obj.interactable = false;
                }
            }

            yield return(null);
        }
Beispiel #24
0
 public static GameObject Create(LanotaliumContext context)
 {
     if (!Exists())
     {
         var manager = new GameObject("pParticleManager");
         if (manager != null)
         {
             manager.AddComponent <ParticleManager>();
             manager.GetComponent <ParticleManager>().context = context;
             manager.SetActive(true);
             return(manager);
         }
         return(null);
     }
     else
     {
         return(GameObject.Find("pParticleManager"));
     }
 }
Beispiel #25
0
        public IEnumerator PasteAll(LanotaliumContext context, float timing, float deg_offset = 0.0f, float radius_multiply = 1.0f)
        {
            foreach (var note in taps)
            {
                var nnote = note.DeepCopy();
                nnote.Time    = nnote.Time - timing_fastest + timing;
                nnote.Degree += deg_offset;
                context.OperationManager.AddTapNote(nnote, false, true, true);
            }
            foreach (var note in holds)
            {
                var nnote = note.DeepCopy();
                nnote.Time    = nnote.Time - timing_fastest + timing;
                nnote.Degree += deg_offset;
                context.OperationManager.AddHoldNote(nnote, false, true, true);
            }
            foreach (var motion in motions)
            {
                if (motion is LanotaCameraRot)
                {
                    var nmotion = (motion as LanotaCameraRot).DeepCopy();
                    nmotion.Time = nmotion.Time - timing_fastest + timing;
                    context.OperationManager.AddRotation(nmotion, false, false, true);
                }

                else if (motion is LanotaCameraXZ)
                {
                    var nmotion = (motion as LanotaCameraXZ).DeepCopy();
                    nmotion.Time = nmotion.Time - timing_fastest + timing;
                    context.OperationManager.AddHorizontal(nmotion, false, false, true);
                    context.OperationManager.SetHorizontalRadius(nmotion, nmotion.ctp1 * radius_multiply);
                }
                else if (motion is LanotaCameraY)
                {
                    var nmotion = (motion as LanotaCameraY).DeepCopy();
                    nmotion.Time = nmotion.Time - timing_fastest + timing;
                    context.OperationManager.AddVertical(nmotion, false, false, true);
                }
            }
            yield return(null);
        }
Beispiel #26
0
        public IEnumerator OnLoaded(string configPath, LanotaliumContext context)
        {
            var          assetpath = Application.streamingAssetsPath + "/Assets/tunercore";
            CoreResource r         = null;

            yield return(ResourceBundle.LoadFromBundle <CoreResource>(assetpath, x => r = x));

            var coreObj = GameObject.Find("Tuner/Core");

            if (coreObj != null)
            {
                var spriteRend = coreObj.GetComponent <SpriteRenderer>();
                if (spriteRend != null)
                {
                    spriteRend.sprite = r.Prefab_CoreBigImage;
                    spriteRend.color  = new Color(0.7f, 0.7f, 0.7f, 1.0f);
                }

                coreObj.transform.localScale = new Vector3(0.14f, 0.14f, 1.0f);
            }
        }
        public IEnumerator InitResources(LanotaliumContext context)
        {
            //Find Objects
            FullScreenCanvas          = GameObject.Find("FullScreenCanvas");
            Header                    = GameObject.Find("Head");
            Copyright                 = GameObject.Find("Copyright");
            ChartName                 = GameObject.Find("ChartName");
            ChartDesigner             = GameObject.Find("ChartDesigner");
            ChartDesigner_Placeholder = GameObject.Find("ChartDesigner/Placeholder");
            ChartDesigner_Text        = GameObject.Find("ChartDesigner/Text");

            cWhisper    = new Color(0.113f, 0.294f, 0.396f); //29 75 101
            cAcoustic   = new Color(0.031f, 0.470f, 0.454f); //8 120 116
            cUltra      = new Color(0.494f, 0.074f, 0.062f); //126 19 16
            cMaster     = new Color(0.431f, 0.141f, 0.525f); //110 36 134
            cLanotaText = new Color(0.937f, 0.917f, 0.788f); //239, 234, 201

            yield return(ResourceBundle.LoadFromBundle <Resources.LanotaHeaderResources>(Application.streamingAssetsPath + "/Assets/uitweak/uitweak.header", x => Res = x));

            yield return(null);
        }
        public IEnumerator Process(LanotaliumContext context)
        {
            var manager = GameObject.Find("EditorTweak");

            if (manager == null)
            {
                manager = new GameObject("EditorTweak");
                manager.AddComponent <TweakManager>();
                manager.GetComponent <TweakManager>().context = context;
                manager.SetActive(true);

                context.MessageBox.ShowMessage("Turned on");
            }
            else
            {
                GameObject.Destroy(manager);

                context.MessageBox.ShowMessage("Turned off");
            }
            yield return(true);
        }
Beispiel #29
0
        private void LateUpdate()
        {
            var context = new LanotaliumContext()
            {
                IsProjectLoaded  = (LimProjectManager.CurrentProject != null && LimTunerManager.Instance.isInitialized),
                CurrentProject   = LimProjectManager.CurrentProject,
                CurrentLanguage  = LimLanguageManager.CurrentLanguage == "简体中文" ? Language.简体中文 : Language.English,
                EditorManager    = LimEditorManager.Instance,
                TunerManager     = LimTunerManager.Instance,
                OperationManager = LimOperationManager.Instance,
                UserRequest      = EasyRequest.EasyRequestManager.Instance,
                MessageBox       = MessageBoxManager.Instance
            };

            foreach (var plugin in Plugins)
            {
                var configPath = PathUtil.GetConfigPath(plugin.Name);
                StartCoroutine(plugin.Method(configPath, context));
            }
            this.enabled = false;
        }
Beispiel #30
0
        public IEnumerator Process(LanotaliumContext context)
        {
            if (context.IsProjectLoaded)
            {
                var judgeline = GameObject.Find("Tuner/JudgeLine");
                if (judgeline != null)
                {
                    OrnamentResources r = new OrnamentResources();
                    yield return(ResourceBundle.LoadFromBundle <OrnamentResources>(Application.streamingAssetsPath + "/Assets/uitweak/uitweak.screen", x => r = x, context));

                    GameObject.Instantiate(r.Prefab_JudgeGlow, judgeline.transform).AddComponent <GlowManager>().c = context;
                    GameObject.Instantiate(r.Prefab_JudgeOrnament, judgeline.transform);
                }
                else
                {
                    context.MessageBox.ShowMessage("no judgeline");
                }
            }

            yield return(null);
        }