docs: Updated README.md

This commit is contained in:
Syntriax 2023-03-21 16:18:35 +03:00
parent 8650d3806b
commit 119cc2c628
1 changed files with 23 additions and 6 deletions

View File

@ -1,11 +1,28 @@
# Movement (Work In Progress)
## Dependencies
1. [State Module](https://git.syntriax.com/Syntriax/State)
2. [Trigger Module](https://git.syntriax.com/Syntriax/Trigger)
3. [Factory Module](https://git.syntriax.com/Syntriax/Factory)
## Installation
### UPM
1. Add the UPM registry. Click on the `Edit` menu, then select `Project settings...`, select `Package Manager`, and add a scoped registry:
- Name: `Syntriax`
- Url: `https://upm.syntriax.com`
- Scopes:
- `com.syntriax`
Make sure to separately clone these modules along with this one too.
The UPM registry also has proxies to OpenUPM, so you can add scopes from there too.
### Manual
1. Navigate into `Package Manager` and press on the `+` button, choose `Add package from git URL...` and add:
- `https://git.syntriax.com/Syntriax/State`
- `https://git.syntriax.com/Syntriax/Trigger`
- `https://git.syntriax.com/Syntriax/Factory`
- `https://git.syntriax.com/Syntriax/Movement`
---
### Dependencies
1. [State Module (https://git.syntriax.com/Syntriax/State)](https://git.syntriax.com/Syntriax/State)
2. [Trigger Module (https://git.syntriax.com/Syntriax/Trigger)](https://git.syntriax.com/Syntriax/Trigger)
3. [Factory Module (https://git.syntriax.com/Syntriax/Factory)](https://git.syntriax.com/Syntriax/Factory)
---
@ -36,7 +53,7 @@ Make sure to separately clone these modules along with this one too.
3. Add `MovementController` component to your Player `GameObject`
4. Add `AirMovement1D` component to your Player `GameObject`
5. Add `GroundMovement1D` component to your Player `GameObject` (make sure it's bellow `AirMovement1D`)
6. Add a new empty child `GameObject` and add `Box2DColliderTrigger` component to it and place and resize it under the player for ground detection, optionally you can set the `CollisionMask` field on it to make sure it only detects specific layers
6. Add a new empty child `GameObject` and add `Box2DGroundTrigger` & `GroundTrigger` component to it and place and resize it under the player for ground detection, optionally you can set the `CollisionMask` field on it to make sure it only detects specific layers
7. Connect your inputs to the `MovementController` ([Example with Input System](#input-system-example))
8. (Optional) Add a jumping script to see the effects better