Non-WinForms launcher with auto updater
This commit is contained in:
@@ -97,7 +97,7 @@ namespace Subsurface
|
||||
|
||||
public Level(string seed, float difficulty, int width, int height, int siteInterval)
|
||||
{
|
||||
if (shaftTexture == null) shaftTexture = Game1.TextureLoader.FromFile("Content/Map/shaft.png");
|
||||
if (shaftTexture == null) shaftTexture = TextureLoader.FromFile("Content/Map/shaft.png");
|
||||
|
||||
if (basicEffect==null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace Subsurface
|
||||
basicEffect.VertexColorEnabled = false;
|
||||
|
||||
basicEffect.TextureEnabled = true;
|
||||
basicEffect.Texture = Game1.TextureLoader.FromFile("Content/Map/iceSurface.png");
|
||||
basicEffect.Texture = TextureLoader.FromFile("Content/Map/iceSurface.png");
|
||||
}
|
||||
|
||||
this.seed = seed;
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Subsurface.Lights
|
||||
penumbraEffect.TextureEnabled = true;
|
||||
//shadowEffect.VertexColorEnabled = true;
|
||||
penumbraEffect.LightingEnabled = false;
|
||||
penumbraEffect.Texture = Game1.TextureLoader.FromFile("Content/Lights/penumbra.png");
|
||||
penumbraEffect.Texture = TextureLoader.FromFile("Content/Lights/penumbra.png");
|
||||
}
|
||||
|
||||
if (penumbraVertices==null)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Subsurface.Lights
|
||||
|
||||
if (lightTexture == null)
|
||||
{
|
||||
lightTexture = Game1.TextureLoader.FromFile("Content/Lights/light.png");
|
||||
lightTexture = TextureLoader.FromFile("Content/Lights/light.png");
|
||||
}
|
||||
|
||||
texture = lightTexture;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Subsurface.Lights
|
||||
|
||||
if (alphaClearTexture==null)
|
||||
{
|
||||
alphaClearTexture = Game1.TextureLoader.FromFile("Content/Lights/alphaOne.png");
|
||||
alphaClearTexture = TextureLoader.FromFile("Content/Lights/alphaOne.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace Subsurface
|
||||
connections = new List<LocationConnection>();
|
||||
|
||||
if (iceTexture==null) iceTexture = new Sprite("Content/Map/iceSurface.png", Vector2.Zero);
|
||||
if (iceCraters == null) iceCraters = Game1.TextureLoader.FromFile("Content/Map/iceCraters.png");
|
||||
if (iceCrack == null) iceCrack = Game1.TextureLoader.FromFile("Content/Map/iceCrack.png");
|
||||
if (iceCraters == null) iceCraters = TextureLoader.FromFile("Content/Map/iceCraters.png");
|
||||
if (iceCrack == null) iceCrack = TextureLoader.FromFile("Content/Map/iceCrack.png");
|
||||
|
||||
Rand.SetSyncedSeed(ToolBox.StringToInt(this.seed));
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ namespace Subsurface
|
||||
|
||||
waterEffect = new Effect(graphicsDevice, bytecode);
|
||||
|
||||
waterTexture = Game1.TextureLoader.FromFile("Content/waterbump.jpg");
|
||||
waterEffect.Parameters["xWaveWidth"].SetValue(0.1f);
|
||||
waterEffect.Parameters["xWaveHeight"].SetValue(0.1f);
|
||||
waterEffect.Parameters["xBlurDistance"].SetValue(0.0007f);
|
||||
waterTexture = TextureLoader.FromFile("Content/waterbump.png");
|
||||
waterEffect.Parameters["xWaveWidth"].SetValue(0.05f);
|
||||
waterEffect.Parameters["xWaveHeight"].SetValue(0.05f);
|
||||
|
||||
|
||||
if (basicEffect==null)
|
||||
{
|
||||
@@ -45,13 +45,14 @@ namespace Subsurface
|
||||
}
|
||||
}
|
||||
|
||||
public void RenderBack (SpriteBatch spriteBatch, RenderTarget2D texture, Matrix transform)
|
||||
public void RenderBack (SpriteBatch spriteBatch, RenderTarget2D texture, float blurAmount = 0.0007f)
|
||||
{
|
||||
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearWrap);
|
||||
|
||||
waterEffect.CurrentTechnique = waterEffect.Techniques["WaterShader"];
|
||||
waterEffect.Parameters["xTexture"].SetValue(texture);
|
||||
waterEffect.Parameters["xWavePos"].SetValue(wavePos);
|
||||
waterEffect.Parameters["xWavePos"].SetValue(wavePos);
|
||||
waterEffect.Parameters["xBlurDistance"].SetValue(blurAmount);
|
||||
waterEffect.CurrentTechnique.Passes[0].Apply();
|
||||
|
||||
wavePos.X += 0.0001f;
|
||||
|
||||
@@ -150,17 +150,17 @@ namespace Subsurface
|
||||
editingHUD.Padding = new Vector4(10, 10, 0, 0);
|
||||
editingHUD.UserData = this;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing waypoint", GUI.style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another entity", GUI.style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 40, 100, 20), "Spawnpoint: ", GUI.style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing waypoint", GUI.Style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another entity", GUI.Style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 40, 100, 20), "Spawnpoint: ", GUI.Style, editingHUD);
|
||||
|
||||
var spawnTypeText = new GUITextBlock(new Rectangle(0, 40, 200, 20), spawnType.ToString(), GUI.style, Alignment.Right, Alignment.TopLeft, editingHUD);
|
||||
var spawnTypeText = new GUITextBlock(new Rectangle(0, 40, 200, 20), spawnType.ToString(), GUI.Style, Alignment.Right, Alignment.TopLeft, editingHUD);
|
||||
|
||||
var button = new GUIButton(new Rectangle(-30,0,20,20), "-", Alignment.Right, GUI.style, spawnTypeText);
|
||||
var button = new GUIButton(new Rectangle(-30,0,20,20), "-", Alignment.Right, GUI.Style, spawnTypeText);
|
||||
button.UserData = -1;
|
||||
button.OnClicked = ChangeSpawnType;
|
||||
|
||||
button = new GUIButton(new Rectangle(0, 0, 20, 20), "+", Alignment.Right, GUI.style, spawnTypeText);
|
||||
button = new GUIButton(new Rectangle(0, 0, 20, 20), "+", Alignment.Right, GUI.Style, spawnTypeText);
|
||||
button.UserData = 1;
|
||||
button.OnClicked = ChangeSpawnType;
|
||||
|
||||
@@ -169,14 +169,14 @@ namespace Subsurface
|
||||
y = 40+20;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, y, 100, 20), "ID Card tags:", Color.Transparent, Color.Black, Alignment.TopLeft, null, editingHUD);
|
||||
GUITextBox propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.style, editingHUD);
|
||||
GUITextBox propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
|
||||
propertyBox.Text = string.Join(", ", idCardTags);
|
||||
propertyBox.OnEnter = EnterIDCardTags;
|
||||
propertyBox.OnTextChanged = TextBoxChanged;
|
||||
y = y + 30;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, y, 100, 20), "Assigned job:", Color.Transparent, Color.Black, Alignment.TopLeft, null, editingHUD);
|
||||
propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.style, editingHUD);
|
||||
propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
|
||||
propertyBox.Text = (assignedJob == null) ? "None" : assignedJob.Name;
|
||||
|
||||
propertyBox.OnEnter = EnterAssignedJob;
|
||||
|
||||
Reference in New Issue
Block a user