Progress on tutorial
This commit is contained in:
@@ -117,7 +117,7 @@ namespace Subsurface
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<Status> DimLight()
|
||||
private IEnumerable<object> DimLight()
|
||||
{
|
||||
float currBrightness= 1.0f;
|
||||
float startRange = light.Range;
|
||||
|
||||
@@ -14,6 +14,11 @@ namespace Subsurface
|
||||
get;
|
||||
}
|
||||
|
||||
AITarget AiTarget
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
AttackResult AddDamage(Vector2 position, DamageType damageType, float amount, float bleedingAmount, float stun, bool playSound=true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,6 @@ namespace Subsurface.Lights
|
||||
|
||||
public void DrawLOS(GraphicsDevice graphics, Camera cam, Vector2 pos)
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
|
||||
Rectangle camView = new Rectangle(cam.WorldView.X, cam.WorldView.Y - cam.WorldView.Height, cam.WorldView.Width, cam.WorldView.Height);
|
||||
|
||||
if (!LosEnabled) return;
|
||||
@@ -70,15 +67,10 @@ namespace Subsurface.Lights
|
||||
convexHull.DrawShadows(graphics, cam, pos);
|
||||
}
|
||||
|
||||
long elapsed = sw.ElapsedTicks;
|
||||
Debug.WriteLine("los: "+elapsed);
|
||||
}
|
||||
|
||||
public void DrawLightmap(GraphicsDevice graphics, SpriteBatch spriteBatch, Camera cam)
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
|
||||
graphics.SetRenderTarget(lightMap);
|
||||
|
||||
Rectangle viewRect = cam.WorldView;
|
||||
@@ -116,10 +108,6 @@ namespace Subsurface.Lights
|
||||
//clear alpha, to avoid messing stuff up later
|
||||
ClearAlphaToOne(graphics, spriteBatch);
|
||||
graphics.SetRenderTarget(null);
|
||||
|
||||
|
||||
long elapsed = sw.ElapsedTicks;
|
||||
Debug.WriteLine("lights: " + elapsed);
|
||||
}
|
||||
|
||||
private void ClearAlphaToOne(GraphicsDevice graphics, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -98,6 +98,10 @@ namespace Subsurface
|
||||
get { return prefab.MaxHealth; }
|
||||
}
|
||||
|
||||
public AITarget AiTarget
|
||||
{
|
||||
get { return null;}
|
||||
}
|
||||
|
||||
public override void Move(Vector2 amount)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user