/// <summary> /// Constructor for the RigidBody2D Class with full information /// Anything affected by Physics should be, or inherit from, the RigidBody /// </summary> /// <param name="newTransform">The Transform of the Object</param> /// <param name="newScale">The Scale of the Object</param> /// <param name="newRotation">The Rotation of the Object</param> /// <param name="newMass">The Mass of the Object</param> /// <param name="isStatic">Whether the object is movable</param> public RigidBody2D(Vector2 newTransform, Vector2 newScale, Vector3 newRotation, float newMass, bool isStatic, FrictionCoefficients newFriction, float newBounciness) : base(newTransform, newScale, newRotation) { Mass = newMass; IsStaticHorizontal = isStatic; IsStaticVertical = isStatic; IsIgnoringGravity = false; Friction = newFriction; Bounciness = newBounciness; }
/// <summary> /// Default Constructor /// </summary> public Platform() { PlatformType = PlatformTypes.Static; ConnectedWaypoints = new List <WaypointNode>(); Size = new Vector2(); Scale = new Vector2(1, 1); Friction = new FrictionCoefficients() { StaticCoefficient = 0.0f, DynamicCoefficient = 0.0f }; Tag = "Ground"; }
/// <summary> /// Default Constructor for the RigidBody2D Class /// Anything affected by Physics should be, or inherit from, the RigidBody /// </summary> public RigidBody2D() : base() { Mass = 1; IsStaticHorizontal = false; IsStaticVertical = false; IsIgnoringGravity = false; Friction = new FrictionCoefficients() { StaticCoefficient = 0.0f, DynamicCoefficient = 0.0f }; Bounciness = 0.0f; }