Skip to content

Conversation

@github-classroom
Copy link
Contributor

@github-classroom github-classroom bot commented Apr 10, 2022

👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to main since the assignment started. Your teacher can see this too.

Notes for teachers Use this PR to leave feedback. Here are some tips: - Click the **Files changed** tab to see all of the changes pushed to `main` since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue **+** (plus sign). To learn more about comments, read “[Commenting on a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)”. - Click the **Commits** tab to see the commits pushed to `main`. Click a commit to see specific changes. - If you turned on autograding, then click the **Checks** tab to see the results. - This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below. For more information about this pull request, read “[Leaving assignment feedback in GitHub](https://docs.github.com/education/manage-coursework-with-github-classroom/leave-feedback-with-pull-requests)”.

Subscribed: @danmastalerz

## Biblioteki
- Bevy
- może coś do serializacji danych? (czy mógłby Pan coś polecić?)
- coś do obsługi bazy danych (zapisywanie profili graczy i ich statystyk)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diesel?

Copy link

@agluszak agluszak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bardzo ładny projekt! W zasadzie nie mam uwag.
5/5

Comment on lines +134 to +137
global_transform: Default::default(),
text_2d_size: Default::default(),
text_2d_bounds: Default::default(),
visibility: Visibility { is_visible: true },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
global_transform: Default::default(),
text_2d_size: Default::default(),
text_2d_bounds: Default::default(),
visibility: Visibility { is_visible: true },
visibility: Visibility { is_visible: true },
..Default::default()

Comment on lines +176 to +186
commands
.spawn_bundle(SpriteBundle {
texture: asset_server.load(PLAYER_BLUE_SPRITE),
//Move the player to the right side.
transform: Transform::from_translation(Vec3::new(BLUE_INITIAL_X, 0.0, 5.0)),
..Default::default()
})
.insert(PlayerBlue)
.insert(Velocity { x: 0.0, y: 0.0 })
.insert(Radius(PLAYER_RADIUS));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to najlepiej do funkcji wyciągnąć, skoro się powtarza

let multiplier = (-d + radius1 + radius2) / d;
let delta_x = delta.x * multiplier;
let delta_y = delta.y * multiplier;
let mtd = Vec2::new(delta_x, delta_y);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

co to mtd?

let delta_y = delta.y * multiplier;
let mtd = Vec2::new(delta_x, delta_y);

let im1 = 1.;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

co to im?

mut query_ball: Query<(&mut Velocity, &mut Transform, &Ball, Without<PlayerRed>)>,
kb: Res<Input<KeyCode>>,
) {
let (mut velocity_red, mut transform_red, _) = query_red.iter_mut().next().unwrap();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

// Detects collision between blue player and the ball.
fn collision_system_blue(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ponieważ ten system też jest analogiczny, to proponowałbym wyciągniecie wspólnej logiki do funkcji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants