Skip to content

Commit

Permalink
Update game_ball.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Rita1218 authored Jan 18, 2024
1 parent 3ea74fd commit 6e33a73
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions src/GameBall/core/game_ball.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,34 @@ void GameBall::OnInit() {
auto primary_player = world->CreatePlayer();
auto enemy_player = world->CreatePlayer();
auto primary_unit = world->CreateUnit<Logic::Units::RegularBall>(
primary_player->PlayerId(), glm::vec3{0.0f, 1.0f, 0.0f}, 1.0f, 1.0f);
primary_player->PlayerId(), glm::vec3{2.5f, 1.0f, 0.0f}, 1.0f, 1.0f);
auto enemy_unit_1 = world->CreateUnit<Logic::Units::RegularBall>(
enemy_player->PlayerId(), glm::vec3{-5.0f, 1.0f, 0.0f}, 1.0f, 1.0f);
auto enemy_unit_2 = world->CreateUnit<Logic::Units::RegularBall>(
enemy_player->PlayerId(), glm::vec3{5.0f, 1.0f, 0.0f}, 1.0f, 1.0f);
auto enemy_unit_3 = world->CreateUnit<Logic::Units::RegularBall>(
enemy_player->PlayerId(), glm::vec3{-2.5f, 1.0f, 0.0f}, 1.0f, 1.0f);
auto enemy_unit_2 = world->CreateObstacle<Logic::Obstacles::Block>(
glm::vec3{0.0f, -0.53f, 5.0f}, std::numeric_limits<float>::infinity(),
false, 2.0f);
auto enemy_unit_3 = world->CreateObstacle<Logic::Obstacles::Block>(
glm::vec3{0.0f, -0.53f, -5.0f}, std::numeric_limits<float>::infinity(),
false, 2.0f);
auto enemy_unit_4 = world->CreateObstacle<Logic::Obstacles::Block>(
glm::vec3{5.0f, -0.53f, 0.0f}, std::numeric_limits<float>::infinity(),
false, 2.0f);
auto enemy_unit_5 = world->CreateObstacle<Logic::Obstacles::Block>(
glm::vec3{-5.0f, -0.53f, 0.0f}, std::numeric_limits<float>::infinity(),
false, 2.0f);
auto enemy_unit_6 = world->CreateObstacle<Logic::Obstacles::Block>(
glm::vec3{0.0f, -0.53f, 0.0f}, std::numeric_limits<float>::infinity(),
false, 2.0f);

/*auto enemy_unit_3 = world->CreateUnit<Logic::Units::RegularBall>(
enemy_player->PlayerId(), glm::vec3{0.0f, 1.0f, 5.0f}, 1.0f, 1.0f);
auto enemy_unit_4 = world->CreateUnit<Logic::Units::RegularBall>(
enemy_player->PlayerId(), glm::vec3{0.0f, 1.0f, -5.0f}, 1.0f, 1.0f);
enemy_player->PlayerId(), glm::vec3{0.0f, 1.0f, -5.0f}, 1.0f, 1.0f);*/
auto primary_obstacle = world->CreateObstacle<Logic::Obstacles::Block>(
glm::vec3{0.0f, -10.0f, 0.0f}, std::numeric_limits<float>::infinity(),
false, 20.0f);


primary_player_id_ = primary_player->PlayerId();
enemy_player_id_ = enemy_player->PlayerId();

Expand Down

0 comments on commit 6e33a73

Please sign in to comment.