1 using Microsoft.Xna.Framework;
2 using System.Collections.Generic;
10 public float Range {
get;
set; }
15 private readonly Dictionary<Identifier, Color> liquidColors;
23 foreach (var subElement
in element.Elements())
25 switch (subElement.Name.ToString().ToLowerInvariant())
29 liquidColors =
new Dictionary<Identifier, Color>();
30 foreach (XElement paintElement
in subElement.Elements())
32 Identifier paintName = paintElement.GetAttributeIdentifier(
"paintitem", Identifier.Empty);
33 Color paintColor = paintElement.GetAttributeColor(
"color", Color.Transparent);
35 if (paintName !=
string.Empty)
37 liquidColors.Add(paintName, paintColor);
44 InitProjSpecific(element);
55 public override bool Use(
float deltaTime,
Character character =
null)
57 return character !=
null || character.Removed;
bool IsShootable
Should the item's Use method be called with the "Use" or with the "Shoot" key?
bool RequireAimToUse
If true, the user has to hold the "aim" key before use is registered. False by default.
Sprayer(Item item, ContentXElement element)
override void OnItemLoaded()
Called when all the components of the item have been loaded. Use to initialize connections between co...
override bool Use(float deltaTime, Character character=null)