public IEnumerator when_move_to_down_should_touch_collider_down() { ai.desire_direction = Vector3.back; yield return(new WaitForSeconds(2)); down.assert_collision_enter(ai.gameObject); up.assert_not_collision_enter(); left.assert_not_collision_enter(); right.assert_not_collision_enter(); }
public IEnumerator if_the_desire_directin_is_zero_should_no_move() { bullet.desire_direction = Vector3.zero; yield return(new WaitForSeconds(1)); tests_tool.assert.game_object.is_not_null(bullet); center.assert_not_collision_exit(bullet); left.assert_not_collision_enter(); right.assert_not_collision_enter(); back.assert_not_collision_enter(); forward.assert_not_collision_enter(); }
public IEnumerator move_left_should_can_hit_left_assert() { controller.desire_direction = Vector3.left; yield return(new WaitForSeconds(1)); controller.shot(); yield return(new WaitForSeconds(1)); left.assert_collision_enter(); right.assert_not_collision_enter(); forward.assert_not_collision_enter(); back.assert_not_collision_enter(); }
public IEnumerator when_hit_should_destroy_the_bullet() { Linear_gun gun = weapon.GetComponent <Linear_gun>(); var bullet = gun.shot(); yield return(new WaitForSeconds(1)); helper.game_object.comp.is_null(bullet); target.assert_not_collision_enter(); }
public IEnumerator agent_shold_touch_all_colliders() { yield return(new WaitForSeconds(4)); touch_1.assert_collision_enter(player); touch_2.assert_collision_enter(player); touch_3.assert_collision_enter(player); no_touch_1.assert_not_collision_enter(player); no_touch_2.assert_not_collision_enter(player); yield return(new WaitForSeconds(0.1f)); }
public IEnumerator multiple_shots() { yield return(new WaitForSeconds(1)); controller.desire_direction = Vector3.right; yield return(new WaitForSeconds(1)); var bullet = controller.shot(); yield return(new WaitForSeconds(1)); right.assert_collision_enter(bullet[0]); controller.desire_direction = Vector3.left; yield return(new WaitForSeconds(1)); bullet = controller.shot(); yield return(new WaitForSeconds(1)); left.assert_collision_enter(bullet[0]); controller.desire_direction = Vector3.back; yield return(new WaitForSeconds(1)); bullet = controller.shot(); yield return(new WaitForSeconds(1)); back.assert_collision_enter(bullet[0]); controller.desire_direction = Vector3.forward; yield return(new WaitForSeconds(1)); bullet = controller.shot(); yield return(new WaitForSeconds(1)); forward.assert_not_collision_enter(); }