public void UpdateUI() { Animateable.UpdateAll(Engine.DeltaTime); tooltip = null; bool worldTooltip = true; foreach (Widget w in Widgets) { if (w.IsHovered) { worldTooltip = false; tooltip = w.GetHovered().GetTooltip(); } } //if no tooltip from widgets //if (tooltip == null) if (worldTooltip) { Vector2i hoveredSquare = ScreenToGrid(Engine.MousePosition); if (hoveredSquare != null) { GenerateTileTooltip(Game.World.Map.At(hoveredSquare)); } } }
public Unit( fbWorld world, UnitType unitType, int owner, int id, int x, int y ) { animateable = new Animateable(this); World = world; game = World.Game; UnitType = unitType; Owner = owner; ID = id; this.x = x; this.y = y; Moves = UnitType.Moves; Attacks = UnitType.Attacks; Strength = UnitType.Strength; }