Engine Provided Components - NocturnalWisp/Tynted-Engine GitHub Wiki

Getting Started

At the moment there are 2 engine provided components.

  • Transform
  • SpriteRenderee

You can utilize these different components as you like, or you can even remove them if you don't want to use them at all. Note. You would also need to remove each of the systems that the engine comes with as well.

Here are the constructors for them:

Transform t = new Transform(position, rotation(optional), scale(optional));
- Transform t = new Transform(position, rotation(optional), scale(optional), parent(optional));
SpriteRenderee sr = new SpriteRenderee(texture);

The attributes for each:

  • Transform
    • SetParent() - Sets the parent of the transform
    • GetParent() - Returns the parent of the transform
    • CalculateLocalToParentMatrix() - Returns the matrix of the transform based on it's parents position.
    • GetWorldPosition() - Returns the position of the object based around the (0, 0) point.
    • TransformPoint() - Returns the position based around a point.
    • TransformDirection() - Returns the direction based on the point vs the transform.
    • InverseTransformPoint() - Opposite of TransformPoint.
    • InverseTransformDirection() - Opposite of TransformDirection.
    • LocalPosition - Returns the local position of the transform.
    • LocalRotation - Returns the rotation of the transform.
    • LocalScale - Returns the scale of the transform.
  • SpriteRenderee
    • Sprite - The resulting sprite the component creates based off of the texture given. (SFML)

Conclusion

Overall these should be helpful in multiple different circumstances, however; you are welcome to use these components in any way you want, or not at all.