Exemplo n.º 1
0
        public override void PreUpdate()
        {
            if (Main.netMode == NetmodeID.SinglePlayer || Main.dedServ)
            {
                TimeSkipManager.UpdateTimeSkip();
                TimeStopManagement.MainOnOnTick();
            }


            TBAPlayer plr = TimeStopManagement.TimeStopper as TBAPlayer;

            if (TimeStopManagement.TimeStoppedFor <= 78 && TimeStopManagement.TimeStoppedFor > 76)
            {
                if (plr.StandUser)
                {
                    if (plr.Stand is TheWorldStand)
                    {
                        TBAMod.PlayVoiceLine("Sounds/TheWorld/TimeResume");
                        Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/TheWorld/TheWorld_ZaWarudoReleaseSFX"));
                    }

                    if (plr.Stand is StarPlatinumStand)
                    {
                        Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/StarPlatinum/SP_TimeRestore"));
                    }
                }
            }

            base.PreUpdate();
        }
Exemplo n.º 2
0
        public override void Load()
        {
            base.Load();

            TimeStopManager = new TimeStopManager();
            TimeSkipManager = new TimeSkipManager();

            if (!Main.dedServ)
            {
                UIManager.Instance.Initialize();
                TextureLoader.Load();

                Ref <Effect> screenRef = new Ref <Effect>(GetEffect("Effects/ShockwaveEffect")); // The path to the compiled shader file.
                Filters.Scene["Shockwave"] = new Filter(new ScreenShaderData(screenRef, "Shockwave"), EffectPriority.VeryHigh);
                Filters.Scene["Shockwave"].Load();

                SkyManager.Instance["TBA:TimeStopInvert"] = new PerfectlyNormalSky();
                Filters.Scene["TBA:TimeStopInvert"]       = new Filter(new ScreenShaderData("FilterInvert"), EffectPriority.High);

                Filters.Scene["TBA:FreezeSky"]       = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(.7f, .7f, .7f), EffectPriority.VeryHigh);
                SkyManager.Instance["TBA:FreezeSky"] = new FreezeSky();
                AddEquipTexture(null, EquipType.Head, "DiavoloHead", "TBAR/Items/Vanity/VinegarDisguise/DiavoloHead_Head");
                AddEquipTexture(null, EquipType.Body, "DiavoloBody", "TBAR/Items/Vanity/VinegarDisguise/DiavoloChest_Body", "TBAR/Items/Vanity/VinegarDisguise/DiavoloChest_Arms");
            }

            SteamHelper.Initialize();

            OnEdits.Instance.LoadEdits();

            StandLoader.Instance.Load();
            TBARInputs.Load(this);
        }
Exemplo n.º 3
0
        public override void PostDrawTiles()
        {
            if (Main.netMode == NetmodeID.MultiplayerClient)
            {
                TimeSkipManager.UpdateTimeSkip();
                TimeStopManagement.MainOnOnTick();
            }

            base.PostDrawTiles();
        }
Exemplo n.º 4
0
 public void EraseTime()
 {
     if (TimeSkipManager.TimeSkippedFor <= 0 && TBAPlayer.Get(Owner).CheckStaminaCost(25))
     {
         TBAPlayer.Get(Owner).TirePlayer(15);
         Projectile.NewProjectile(Center, Vector2.Zero, ModContent.ProjectileType <FakeTilesProjectile>(), 0, 0, Owner.whoAmI);
         TimeSkipManager.SkipTime(TBAPlayer.Get(Owner), Constants.TICKS_PER_SECOND * 10 + 26);
     }
     else if (TimeSkipManager.TimeSkippedFor > 0)
     {
         Main.projectile.FirstActive(x => x.modProjectile is FakeTilesProjectile).timeLeft = 30;
         TimeSkipManager.SkipTime(TBAPlayer.Get(Owner), 36);
     }
 }