Lights, colored items (only used for wires atm)

This commit is contained in:
Regalis
2015-07-22 20:22:50 +03:00
parent 9a7eae8ace
commit 4820e55e05
51 changed files with 726 additions and 191 deletions
+17 -5
View File
@@ -255,16 +255,28 @@ namespace Subsurface
if (characterMode)
{
if (dummyCharacter != null && dummyCharacter.SelectedConstruction != null)
if (dummyCharacter != null)
{
if (dummyCharacter.SelectedConstruction == dummyCharacter.ClosestItem)
foreach (Item item in dummyCharacter.SelectedItems)
{
dummyCharacter.SelectedConstruction.DrawHUD(spriteBatch, dummyCharacter);
if (item == null) continue;
item.SetTransform(dummyCharacter.SimPosition, 0.0f);
item.Update(cam, (float)deltaTime);
}
else
if (dummyCharacter.SelectedConstruction != null)
{
dummyCharacter.SelectedConstruction = null;
if (dummyCharacter.SelectedConstruction == dummyCharacter.ClosestItem)
{
dummyCharacter.SelectedConstruction.DrawHUD(spriteBatch, dummyCharacter);
}
else
{
dummyCharacter.SelectedConstruction = null;
}
}
}
if (PlayerInput.GetMouseState.LeftButton != ButtonState.Pressed)