private bool ShouldChangeDirection() { var curDir = CurrentDirection(); if (curDir == MovementDirection.Left) { return(m_LeftBounds.position.x <= m_Bounds.GetHorizontalBounds().x); } else { return(m_RightBounds.position.x >= m_Bounds.GetHorizontalBounds().y); } }
/// <summary> /// Returns true if object has completed the movement state. /// </summary> /// <returns>true</returns> /// <c>false</c> /// <param name="owner">Owner.</param> public bool CompletedMove(Transform owner) { return(owner.position.x >= m_Bounds.GetHorizontalBounds().y); }