void BlackDotsUpdate() { int hp = 0; foreach (BlackDotSlot dot in _BlackDots) { dot.Update(); hp += dot._blackDot._HP; } if (_hpPrev != hp) { _DispHP = hp; } if (_bDieOnHP0) { if (_hpPrev > 0 && _DispHP == 0) { Die(); } } _hpPrev = hp; for (int i = _BlackDots.Count - 1; i > 0; i--) { BlackDotSlot dotSlot = _BlackDots [i]; if (dotSlot._blackDot == null) { _BlackDots.RemoveAt(i); } } }
public void NewBlackDot(MiroV1BlackDotBase bkDot) { bool bExist = false; foreach (BlackDotSlot bkdSlot in _BlackDots) { if (bkdSlot._blackDot == bkDot) { bExist = true; } } if (!bExist) { BlackDotSlot newBkDotSlot = new BlackDotSlot(); newBkDotSlot._blackDot = bkDot; _BlackDots.Add(newBkDotSlot); } }