public override void Draw(SpriteBatch spriteBatch) { Color c = Color.White; renderer.display.ClearText(); for (int i = 0; i < InteractionChoices.Count; i++) { if (i == index) { c = Color.Red; } else { c = Color.White; } renderer.display.WriteLine(InteractionChoices[i].text, c); } renderer.Draw(spriteBatch); }
public override void Draw(SpriteBatch spriteBatch) { Color c; renderer.display.ClearText(); renderer.display.WriteLine("=== Pile ===", Color.Yellow); for (int i = 0; i < pile.AmountInPile(); i++) { if (i == index) { c = Color.Red; } else { c = Color.White; } renderer.display.WriteLine(pile.GetItems()[i].ToString(), c); } renderer.Draw(spriteBatch); }
public override void Draw(SpriteBatch spriteBatch) { Color c; renderer.display.ClearText(); // switching between the different states of display switch (displayState) { case InventoryState.InventoryDisplay: { renderer.display.WriteLine("=== INVENTORY ===", Color.Yellow); for (int i = 0; i < actor.Inventory.Count; i++) { if (i == index) { c = Color.Red; } else { c = Color.White; } renderer.display.WriteLine(actor.Inventory[i].ToString(), c); } break; } case InventoryState.ItemInteraction: { renderer.display.WriteLine("=== I T E M ===", Color.Yellow); renderer.display.WriteLine(" "); renderer.display.WriteLine(selected.ToString().PadLeft(5)); renderer.display.WriteLine("-----------------------"); if (selected.GetComponent(TypeOfComponent.WEAPON) != null) { WeaponComponent wc = (WeaponComponent)selected.GetComponent(TypeOfComponent.WEAPON); renderer.display.WriteLine("Wielded : " + wc.wielded.ToString()); } renderer.display.WriteLine("---------------------------"); for (int i = 0; i < InteractionChoices.Count; i++) { if (i == index) { c = Color.Red; } else { c = Color.White; } renderer.display.WriteLine(InteractionChoices[i].text, c); } break; } case InventoryState.ContainerEnterDisplay: { renderer.display.WriteLine("=== AVAILABLE CONTAINERS ===", Color.Yellow); renderer.display.WriteLine(" "); for (int i = 0; i < ContainerList.Count; i++) { if (i == index) { c = Color.Red; } else { c = Color.White; } renderer.display.WriteLine(ContainerList[i].Name, c); } break; } case InventoryState.ContainerExitDisplay: { renderer.display.WriteLine("=== ITEMS IN CONTAINER ===", Color.Yellow); renderer.display.WriteLine(" "); ContainerComponent cc = (ContainerComponent)selectedContainer.GetComponent(TypeOfComponent.CONTAINER); for (int i = 0; i < cc.GetItems.Count; i++) { if (i == index) { c = Color.Red; } else { c = Color.White; } renderer.display.WriteLine(cc.GetItems[i].Name, c); } break; } } renderer.Draw(spriteBatch); }
public override void Draw(SpriteBatch spriteBatch) { render.Draw(spriteBatch); base.Draw(spriteBatch); }