コード例 #1
0
ファイル: Randomizer.cs プロジェクト: rmadlal/OriDERandomizer
 // Token: 0x06003743 RID: 14147 RVA: 0x000E06A0 File Offset: 0x000DE8A0
 public static void Update()
 {
     if (Characters.Sein && !Characters.Sein.IsSuspended)
     {
         Characters.Sein.Mortality.Health.GainHealth((float)RandomizerBonus.HealthRegeneration() * (Characters.Sein.PlayerAbilities.HealthEfficiency.HasAbility ? 0.0016f : 0.0008f));
         Characters.Sein.Energy.Gain((float)RandomizerBonus.EnergyRegeneration() * (Characters.Sein.PlayerAbilities.EnergyEfficiency.HasAbility ? 0.0003f : 0.0002f));
         if (Randomizer.ForceTrees && Scenes.Manager.CurrentScene != null && Scenes.Manager.CurrentScene.Scene == "catAndMouseResurrectionRoom" && RandomizerBonus.SkillTreeProgression() < 10)
         {
             Characters.Sein.Position = new Vector3(20f, 105f);
         }
         if (Randomizer.Chaos)
         {
             RandomizerChaosManager.Update();
         }
     }
     if (MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(KeyCode.RightAlt))
     {
         if (MoonInput.GetKeyDown(RandomizerRebinding.ReplayMessage))
         {
             Randomizer.playLastMessage();
             return;
         }
         if (MoonInput.GetKeyDown(RandomizerRebinding.ReturnToStart) && Characters.Sein)
         {
             Randomizer.returnToStart();
             return;
         }
         if (MoonInput.GetKeyDown(RandomizerRebinding.ReloadSeed))
         {
             Randomizer.initialize();
             Randomizer.showSeedInfo();
             return;
         }
         if (MoonInput.GetKeyDown(RandomizerRebinding.ShowProgress) && Characters.Sein)
         {
             Randomizer.showProgress();
             return;
         }
         if (MoonInput.GetKeyDown(RandomizerRebinding.ToggleChaos) && Characters.Sein)
         {
             if (Randomizer.Chaos)
             {
                 Randomizer.showChaosMessage("Chaos deactivated");
                 Randomizer.Chaos = false;
                 RandomizerChaosManager.ClearEffects();
                 return;
             }
             Randomizer.showChaosMessage("Chaos activated");
             Randomizer.Chaos = true;
             return;
         }
         else if (MoonInput.GetKeyDown(RandomizerRebinding.ChaosVerbosity) && Randomizer.Chaos)
         {
             Randomizer.ChaosVerbose = !Randomizer.ChaosVerbose;
             if (Randomizer.ChaosVerbose)
             {
                 Randomizer.showChaosMessage("Chaos messages enabled");
                 return;
             }
             Randomizer.showChaosMessage("Chaos messages disabled");
             return;
         }
         else if (MoonInput.GetKeyDown(RandomizerRebinding.ForceChaosEffect) && Randomizer.Chaos && Characters.Sein)
         {
             RandomizerChaosManager.SpawnEffect();
             return;
         }
     }
 }
コード例 #2
0
ファイル: TASInput.cs プロジェクト: chalizardmisadon/OriDETAS
        public TASInput(int frames)
        {
            this.Frames     = frames;
            this.XP         = -1;
            this.EN         = -1;
            this.HP         = -1;
            this.Random     = -1;
            this.Copy       = -1;
            this.SkillTree  = -1;
            this.EntityHP   = -1;
            this.Esc        = Core.Input.Cancel.IsPressed;
            this.Action     = Core.Input.ActionButtonA.IsPressed;
            this.Dash       = Core.Input.RightShoulder.IsPressed;
            this.Grenade    = Core.Input.LeftShoulder.IsPressed;
            this.Jump       = Core.Input.Jump.IsPressed;
            this.Save       = Core.Input.SoulFlame.IsPressed;
            this.Fire       = Core.Input.SpiritFlame.IsPressed;
            this.Bash       = Core.Input.Bash.IsPressed;
            this.Start      = Core.Input.Start.IsPressed;
            this.Select     = Core.Input.Select.IsPressed;
            this.ChargeJump = Core.Input.ChargeJump.IsPressed;
            this.Glide      = Core.Input.Glide.IsPressed;

            float dp  = Core.Input.HorizontalDigiPad;
            float ana = Core.Input.HorizontalAnalogLeft;

            this.XAxis = dp < -0.1f ? -1 : (ana < -0.04f ? ana : (dp > 0.1f ? 1 : (ana > 0.04f ? ana : 0)));
            dp         = Core.Input.VerticalDigiPad;
            ana        = Core.Input.VerticalAnalogLeft;
            this.YAxis = dp < -0.1f ? -1 : (ana < -0.04f ? ana : (dp > 0.1f ? 1 : (ana > 0.04f ? ana : 0)));
            this.UI    = (MoonInput.GetKey(UnityEngine.KeyCode.LeftAlt) || MoonInput.GetKey(UnityEngine.KeyCode.RightAlt)) && MoonInput.GetKeyDown(UnityEngine.KeyCode.U);
            if (Core.Input.CursorMoved)
            {
                UnityEngine.Vector2 vector = Core.Input.CursorPosition;
                this.MouseX = vector.x;
                this.MouseY = vector.y;
            }
            else
            {
                this.MouseX = -1;
                this.MouseY = -1;
            }
            this.SaveSlot   = -1;
            this.SpamAction = false;
        }
コード例 #3
0
    public static void Update()
    {
        PracticeManager.UpdateMessages();
        long currentTicks = DateTime.Now.Ticks;
        long tickDelta    = currentTicks - PracticeManager.LastTick - 166667L;

        PracticeManager.LastTick = currentTicks;
        if (PracticeManager.Countdown >= 0)
        {
            PracticeManager.Countdown--;
            if (Characters.Sein)
            {
                Characters.Sein.Position = PracticeManager.StartPosition;
            }
            if (PracticeManager.Countdown == 0)
            {
                PracticeManager.Start();
            }
        }
        if (PracticeManager.Running)
        {
            if (PracticeManager.FrameCount == 1)
            {
                foreach (Core.Input.InputButtonProcessor button in Core.Input.Buttons)
                {
                    if (button != Core.Input.AnyStart)
                    {
                        button.IsPressed  = false;
                        button.WasPressed = false;
                    }
                }
            }
            PracticeManager.ExtraTicks -= tickDelta;
            if (PracticeManager.ExtraTicks > 166667L)
            {
                PracticeManager.ExtraFrames += 1;
                PracticeManager.ExtraTicks  -= 166667L;
            }
            if (PracticeManager.ExtraTicks < -166667L)
            {
                PracticeManager.LagFrames  += 1;
                PracticeManager.ExtraTicks += 166667L;
            }
            if (tickDelta > 166667L)
            {
                PracticeManager.DroppedFrames += (int)(tickDelta / 166667L);
            }
            PracticeManager.MaxDelta = Math.Max(PracticeManager.MaxDelta, tickDelta);
            PracticeManager.FrameCount++;
            PracticeManager.CheckEnd();
        }
        if (MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(KeyCode.RightAlt))
        {
            if (MoonInput.GetKeyDown(KeyCode.Keypad5) || MoonInput.GetKeyDown(KeyCode.Semicolon))
            {
                PracticeManager.SetStart();
            }
            if (MoonInput.GetKeyDown(KeyCode.R))
            {
                PracticeManager.QueueStart();
            }
            if (MoonInput.GetKeyDown(KeyCode.K))
            {
                PracticeManager.Initialize();
            }
            if (MoonInput.GetKeyDown(KeyCode.I))
            {
                PracticeManager.ShowPositionInfo();
            }
            if (MoonInput.GetKeyDown(KeyCode.T))
            {
                PracticeManager.MessageInQueue = 2;
            }
            if (MoonInput.GetKeyDown(KeyCode.E))
            {
                PracticeManager.ShowMessage(PracticeManager.GenerateEfficiencyStats());
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad1) || MoonInput.GetKeyDown(KeyCode.Comma))
            {
                PracticeManager.SetEnd(1);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad2) || MoonInput.GetKeyDown(KeyCode.Period))
            {
                PracticeManager.SetEnd(2);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad3) || MoonInput.GetKeyDown(KeyCode.Slash))
            {
                PracticeManager.SetEnd(3);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad4) || MoonInput.GetKeyDown(KeyCode.L))
            {
                PracticeManager.SetEnd(4);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad6) || MoonInput.GetKeyDown(KeyCode.Quote))
            {
                PracticeManager.SetEnd(6);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad7) || MoonInput.GetKeyDown(KeyCode.P))
            {
                PracticeManager.SetEnd(7);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad8) || MoonInput.GetKeyDown(KeyCode.LeftBracket))
            {
                PracticeManager.SetEnd(8);
            }
            if (MoonInput.GetKeyDown(KeyCode.Keypad9) || MoonInput.GetKeyDown(KeyCode.RightBracket))
            {
                PracticeManager.SetEnd(9);
            }
        }
    }
コード例 #4
0
 // Token: 0x06003439 RID: 13369 RVA: 0x000297AF File Offset: 0x000279AF
 public void Update()
 {
     Randomizer.Update();
     if ((MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(KeyCode.RightAlt)) && MoonInput.GetKeyDown(KeyCode.U))
     {
         UI.SeinUI.ShowUI   = true;
         SeinUI.DebugHideUI = !SeinUI.DebugHideUI;
     }
 }