<commit_before>﻿namespace Macabre2D.Framework.Physics {

    using Macabre2D.Framework.Extensions;
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// The type of body. This lets the physics engine know what to do about updating this body.
    /// </summary>
    public enum BodyType {

        /// <summary>
        /// The static body type. Will not move or react to physics.
        /// </summary>
        Static = 0,

        /// <summary>
        /// The dynamic body type. The body will react to other bodies, but the physics engine will
        /// not take control of the body's velocity.
        /// </summary>
        Dynamic = 1,

        /// <summary>
        /// The kinematic body type. The body will react to other bodies and the physics engine will
        /// handle its velocity at all times.
        /// </summary>
        Kinematic = 2
    }

    /// <summary>
    /// A body to be used by the physics engine.
    /// </summary>
    /// <seealso cref="BaseComponent"/>
    public class Body : BaseComponent, IBoundable {

        [DataMember]
        private Collider _collider;

        [DataMember]
        private PhysicsMaterial _physicsMaterial = PhysicsMaterial.Default;

        /// <summary>
        /// Occurs when [collision occured].
        /// </summary>
        public event EventHandler<CollisionEventArgs> CollisionOccured;

        /// <inheritdoc/>
        public BoundingArea BoundingArea {
            get {
                return this.Collider != null ? this.Collider.BoundingArea : new BoundingArea();
            }
        }

        /// <summary>
        /// Gets the colliders.
        /// </summary>
        /// <value>The colliders.</value>
        public Collider Collider {
            get {
                return this._collider;
            }<commit_msg>Fix: collider transforms will now properly update in the editor, showing them move when their position is changed.<commit_after>﻿namespace Macabre2D.Framework.Physics {

    using Macabre2D.Framework.Extensions;
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// The type of body. This lets the physics engine know what to do about updating this body.
    /// </summary>
    public enum BodyType {

        /// <summary>
        /// The static body type. Will not move or react to physics.
        /// </summary>
        Static = 0,

        /// <summary>
        /// The dynamic body type. The body will react to other bodies, but the physics engine will
        /// not take control of the body's velocity.
        /// </summary>
        Dynamic = 1,

        /// <summary>
        /// The kinematic body type. The body will react to other bodies and the physics engine will
        /// handle its velocity at all times.
        /// </summary>
        Kinematic = 2
    }

    /// <summary>
    /// A body to be used by the physics engine.
    /// </summary>
    /// <seealso cref="BaseComponent"/>
    public class Body : BaseComponent, IBoundable {
        private Collider _collider;

        [DataMember]
        private PhysicsMaterial _physicsMaterial = PhysicsMaterial.Default;

        /// <summary>
        /// Occurs when [collision occured].
        /// </summary>
        public event EventHandler<CollisionEventArgs> CollisionOccured;

        /// <inheritdoc/>
        public BoundingArea BoundingArea {
            get {
                return this.Collider != null ? this.Collider.BoundingArea : new BoundingArea();
            }
        }

        /// <summary>
        /// Gets the colliders.
        /// </summary>
        /// <value>The colliders.</value>
        [DataMember]
        public Collider Collider {
            get {
                return this._collider;
            }
{'fraction_non_alphanumeric': 0.10513771186440678, 'fraction_numerical': 0.0026483050847457626, 'mean_word_length': 1.674929178470255, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4118046', 'n_tokens_mistral': 987, 'n_tokens_neox': 933, 'n_words': 335}