public void IsStopped_ShouldReturnFalse_AfterDecreasedLessTimeThanFirstStarted() { var countDown = new CountDown(); countDown.Start(5); countDown.Decrease(4); Assert.False(countDown.IsStopped); }
public void IsStopped_ShouldReturnTrue_AfterDecreasedMoreTimeThanFirstStarted() { { var countDown = new CountDown(); countDown.Start(5); countDown.Decrease(5); Assert.IsTrue(countDown.IsStopped); } { var countDown = new CountDown(); countDown.Start(5); countDown.Decrease(2); countDown.Decrease(2); countDown.Decrease(2); Assert.IsTrue(countDown.IsStopped); } }
void OnCollisionEnter2D(Collision2D col) { if (!m_IsStuck && col.gameObject.tag == "Arrow") { GameManager.instance.BroadcastGameOver(); } else if (col.gameObject.tag == "Spinner") { transform.parent = m_SpinnerTransform; GameObject cloneGO = Instantiate(gameObject); cloneGO.transform.position = m_InitialPosition; cloneGO.transform.rotation = m_InitialRotation; cloneGO.transform.localScale = m_InitialLocalScale; m_RigidBody.constraints = RigidbodyConstraints2D.FreezeAll; m_CountDown.Decrease(); } }