public override void BombFall(Bomb pBomb) { Debug.Assert(pBomb != null); float distance = this.prevY - pBomb.GetY(); if (distance > 50) { pBomb.SetScaleY(-1.0f); this.prevY = pBomb.GetY(); } }
public override void Fall(Bomb pBomb) { Debug.Assert(pBomb != null); float targetY = oldPosY - 1.0f * pBomb.GetBoundingBoxHeight(); if (pBomb.GetY() < targetY) { pBomb.MultiplyScale(-1.0f, 1.0f); oldPosY = targetY; } }