Add function documentation
All checks were successful
CI / Formatting (push) Successful in 1m30s

This commit is contained in:
Michael Bradley 2025-05-19 22:19:04 -04:00
parent fc95857824
commit 6a151397de
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0
7 changed files with 21 additions and 1 deletions

View file

@ -1,18 +1,22 @@
use avian2d::prelude::*;
use bevy::prelude::*;
/// Basic implementation of a physics object
#[derive(Component, Default)]
#[require(Collider, Mesh2d, MeshMaterial2d<ColorMaterial>, Restitution = Restitution::new(1.0), RigidBody, TransformInterpolation, Transform)]
struct GameObject;
/// A basic ball with which to interact
#[derive(Component, Default)]
#[require(GameObject, RigidBody = RigidBody::Dynamic)]
pub struct Ball;
/// The controllable ball
#[derive(Component, Default)]
#[require(Ball)]
pub struct Player;
/// The static objects bounding the playable area
#[derive(Component, Default)]
#[require(GameObject, RigidBody = RigidBody::Static)]
pub struct Wall;