Added Doom transition
This commit is contained in:
parent
ec9c477dd1
commit
6248cd0ceb
|
|
@ -351,6 +351,22 @@ float4 doors(float2 st : TEXCOORD0) : COLOR0 {
|
|||
return color;
|
||||
}
|
||||
|
||||
float4 doom(float2 st : TEXCOORD0) : COLOR0 {
|
||||
float time=uProgress*0.02;
|
||||
if(uProgress>50.){time=2.-uProgress*0.02;}
|
||||
|
||||
float diff=sin(ceil(st.x*100.)*2.2 + ceil(st.x*st.x*100.)*3.)*0.2 -0.4+time*2.0;
|
||||
|
||||
if(diff>0.){
|
||||
if(uProgress>50.){st.y+=diff;}
|
||||
else{st.y-=diff;}
|
||||
}
|
||||
float4 color = tex2D(uImage0, st);
|
||||
if(st.y>1. || st.y<0.)color = float4(0,0,0,0);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass Lines {PixelShader = compile ps_2_0 lines();}
|
||||
|
|
@ -366,4 +382,5 @@ technique Technique1
|
|||
pass Collapse {PixelShader = compile ps_2_0 columns_sudden_angled();}
|
||||
pass Circle {PixelShader = compile ps_2_0 circle();}
|
||||
pass Doors {PixelShader = compile ps_2_0 doors();}
|
||||
pass Doom {PixelShader = compile ps_2_0 doom();}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -10,10 +10,10 @@ using Terraria.ModLoader;
|
|||
namespace smoothDeathTransitions {
|
||||
public class TransitionPlayer : ModPlayer {
|
||||
|
||||
/*public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource)
|
||||
public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource)
|
||||
{
|
||||
Player.respawnTimer=150; // For testing
|
||||
}*/
|
||||
}
|
||||
|
||||
public string GetBiomeSpecificTransitions(){
|
||||
// This code is going to suck.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace smoothDeathTransitions
|
|||
[DefaultValue("Lines")]
|
||||
[TooltipKey("$DefaultTransitionTooltip")]
|
||||
[DrawTicks]
|
||||
[OptionStrings(["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Collapse", "Circle", "Doors", "Prideful"])]
|
||||
[OptionStrings(["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Collapse", "Circle", "Doors", "Doom", "Prideful"])]
|
||||
public string DefaultTransition;
|
||||
|
||||
[DefaultValue(160)]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Currently available transitions:
|
|||
- Collapse - jagged diagonal letterboxing.
|
||||
- Circle - simple closing-in circle.
|
||||
- Doors - two-sided shut and open.
|
||||
- Doom - puts the screen through a paper shredder.
|
||||
- Prideful - trans flag sweep that optionally replaces the Hallow's ordinary transition.
|
||||
|
||||
Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
[h1]Smooth Death Transitions[/h1]
|
||||
|
||||
Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side (does not alter gameplay) and configurable. Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition for your position.
|
||||
|
||||
Currently available transitions:
|
||||
|
|
@ -15,6 +13,7 @@ Currently available transitions:
|
|||
[*][b]Collapse[/b] - jagged diagonal letterboxing.
|
||||
[*][b]Circle[/b] - simple closing-in circle.
|
||||
[*][b]Doors[/b] - two-sided shut and open.
|
||||
[*][b]Doom[/b] - puts the screen through a paper shredder.
|
||||
[*][b]Prideful[/b] - trans flag sweep that optionally replaces the Hallow's ordinary transition.
|
||||
[/list]
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace smoothDeathTransitions
|
|||
{
|
||||
public class SmoothDeathTransitions : Mod
|
||||
{
|
||||
public string[] transitionsAvailable = ["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Prideful", "Collapse", "Circle", "Doors"];
|
||||
public string[] transitionsAvailable = ["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Prideful", "Collapse", "Circle", "Doors", "Doom"];
|
||||
public override void Load(){
|
||||
if(Main.netMode != NetmodeID.Server){
|
||||
Asset<Effect> screenRef = Assets.Request<Effect>("Effects/transitions");
|
||||
|
|
|
|||
Loading…
Reference in a new issue