public override void Draw(SpriteBatch sb) { base.Draw(sb); Bits.ForEach(x => x.Draw(sb)); if (Placing && DrawPlacingBits) { PlacingBits.ForEach(x => x.DrawHover(sb)); PlacingBits.ForEach(x => x.Draw(sb)); } }
public override void Update(GameTime gt) { base.Update(gt); if (Placing) { PlacingBits.ForEach(x => x.Update(gt)); if (Mouse.LeftMouseDown && Mouse.CanPress) { Console.WriteLine(CanPlaceBits()); if (CanPlaceBits()) { PlaceBits(); } foreach (Bit bit in Bits) { Console.WriteLine("PLACED BIT: " + bit.Coordinates); } } } else { StartPlacing(); } if (FinalizingBits.Count > 0) { List <Bit> bitsToRemove = new List <Bit>(); foreach (Bit b in FinalizingBits) { if (b.FullyPlaced) { bitsToRemove.Add(b); } else { b.Update(gt); } } bitsToRemove.ForEach(x => FinalizingBits.Remove(x)); } }