Animal 1.0.0
dotnet add package Animal --version 1.0.0
NuGet\Install-Package Animal -Version 1.0.0
<PackageReference Include="Animal" Version="1.0.0" />
<PackageVersion Include="Animal" Version="1.0.0" />
<PackageReference Include="Animal" />
paket add Animal --version 1.0.0
#r "nuget: Animal, 1.0.0"
#:package Animal@1.0.0
#addin nuget:?package=Animal&version=1.0.0
#tool nuget:?package=Animal&version=1.0.0
Animal - MonoGame Utility Library
Animal is a versatile and modular library designed to help you with common tasks when creating games in MonoGame. It provides reusable components and patterns to save time and improve the development process. Whether you're creating a game from scratch or need specific features to build upon, Animal is a great starting point for MonoGame developers.
Features
1. Cameras
Camera
- A simple
Cameraclass to manage the game's camera system. - UpdateMatrices: Updates the camera's view and projection matrices.
- GetZFromHeight(float height): Calculates the Z-coordinate based on the height.
- GetHeightFromZ(float z): Calculates the height from a given Z-coordinate.
- MoveZ(float amount): Moves the camera along the Z-axis by the specified amount.
- ResetZ: Resets the camera's Z position to its original value.
- Move(Vector2 amount): Moves the camera by the specified amount.
- MoveTo(Vector2 target): Moves the camera to a target position.
- IncZoom: Increases the camera's zoom level.
- DecZoom: Decreases the camera's zoom level.
- SetZoom(int amount): Sets the zoom to a specific value.
- GetExtents: Returns the camera's current width and height, as well as the extents (left, right, top, bottom) of the camera's view.
- OnResize: Updates the camera when the window is resized.
- A simple
Follow Camera
Inherits fromCamera, and allows the camera to follow a target (smoothly or with boundaries).- FollowSmooth: Smoothly follows a target inside a specified window size and boundary.
- LeadPlayerSmooth: Predicts the player’s movement direction and smoothly follows the target with an offset.
Y-Sort Camera
A camera that sorts sprites based on their Y-position for proper rendering order.- Draw: Draws sprites in order of their layers, ensuring correct rendering.
2. Enums
- DirectionEnum: Enum for cardinal directions (Down, Up, Left, Right).
- WindingOrder: Enum for determining the winding order of polygons (Invalid, CounterClockwise, Clockwise).
3. Events
- KeyEvent: For handling key events and subscriptions.
- Action: Action triggered by the key press.
- Key: The specific key that triggers the event.
4. GameObjects
Player
- PlayerBase: Provides a baseline for player functionality.
- Player: Handles movement and running.
- Move: Updates player position based on movement direction.
- Run: Updates the player's speed based on the run factor.
- AnimatedPlayer: Inherits from
Player, and handles player animation based on movement distance.
TileMaps
- TileMap: Manages tile maps and layers.
- Draw: Draws tiles within a specified viewport.
- IsTileType: Checks if a tile at a specific position matches a given type.
- TileMap: Manages tile maps and layers.
5. Graphics
- DrawScreen: Draws a screen inside the window.
- DrawShapes: Provides utilities for drawing shapes and polygons.
- Polygon triangulation can be calculated using
Vector2[]vertices.
- Polygon triangulation can be calculated using
- DrawSprites: Draws
Texture2Dsprites.
6. Handler
- KeyboardHandler
- Integrates with the
InputManagerfor handling key input. - AddKeyBind: Adds a key binding event.
- RemoveKeyBind: Removes a specified key event.
- Update: Updates key input states during the game loop.
- Integrates with the
7. Managers
- Abstractions
- InputManagerBase: Base class for the
InputManager.
- InputManagerBase: Base class for the
- AnimationManager: Handles animation logic and frame progression.
- TileMapManager: Manages multiple tile map layers.
8. Models
- MapLayer: Contains information about a tile map layer (e.g., if it is collidable).
- Sprite: A base class for sprite information used in drawing.
9. Structs
- Boundary: Defines the bounds (max and min) for an object.
- BoundaryClamp: Ensures an object is within the defined boundary.
- Matrix2D: A simplified 2D matrix class, can be converted to a regular
Matrix. - MovementDirection: Represents the direction an object is moving in, and stores the last movement direction.
10. Wrappers
- BoolWrapper: Allows treating boolean values like integers (1 for true, 0 for false).
11. VectorMath
- LinesIntersect: Checks if two line segments intersect.
Installation
You can install Animal via NuGet:
dotnet add package Animal
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- MonoGame.Content.Builder.Task (>= 3.8.2.1105)
- MonoGame.Framework.DesktopGL (>= 3.8.2.1105)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 139 | 11/23/2024 |