-
Notifications
You must be signed in to change notification settings - Fork 24
Player.WeaponManager
Wesley Haws edited this page Apr 22, 2017
·
4 revisions
This is a list of equipped weapons, dropping weapons, and available weapons.
Parameter | Description |
---|---|
equipweapons | List of all available holding slots. That means if you want the player to only hold a max of 2 weapons only have 2 slots. If you want the player to have a max holding of 5 weapons have 5 slots. It doesn't matter if it is null. If it isn't null that means the player is currently holding that weapon. In the image above the player always contains "NoWeapon", but can't drop it because it's not in the list of available weapon drops (explained later). |
availableweapons | List of all weapons in the game. If the weapon doesn't exist in this array the player can't pick it up or use it. The order is important! The weapon must be at the same index as the dropweapons list. |
dropweapons | List of weapon items that will be dropped to represent an availableweapon that was dropped. The order is important! The dropped weapon at index 0, for example, must match the available weapon at index 0. In the above example you see that you cannot drop the "NoWeapon" because it is null at it's index. Therefore there is no available weapon to be dropped. |
cycleWeaponWait | How long you have to wait before a weapon is finished switching. |
dropWeaponWait | How long you have to hold your designated drop key before the weapon is dropped. |
dropPosition | Location the dropweapons index gameobject is instantiated at. |
The following is a list of github repositories that made all of this possible:
delta patches: https://github.com/OctopusDeploy/Octodiff
.net 4 implemented in Monodevelop: https://github.com/mono/mono
Tuples In Unity: https://gist.github.com/michaelbartnett/5652076
Octodiff: https://github.com/OctopusDeploy/Octodiff
Input Manager: https://github.com/daemon3000/InputManager