Posted July 05, 2022 by danil-ko
Demo:
Summary:
Fix following issues:
https://github.com/danilko/topdown-2d-multiplayer/issues/27: Implement Weapon Type - Remote Weapon
Add following additional controls:
```
Q - PREVIOUS TARGET
E - NEXT TARGET
F - DISABLE AUTO TARGET AIMING
MOUSE MIDDLE WHEEL UP - ZOOM IN
MOUSE MIDDLE WHEEL DOWN - ZOOM OUT
MOUSE MIDDLE BUTTON - REMOTE WEAPON FIRE
```
The store also added a store item Remote Rifle to able to purchase remote item.
After purchase, the item can be used to equip remote weapon.
There will only be maximum 6 remote weapon units allowed per agent at once. Once a remote weapon unit is destroyed, a new one can be added.
Remote units cannot be repaired.
The movement is through sine and consine calculation, which is random but circular format.
The unit can pass through environment, but if block by environment, its fired projectile will be blocked, which give a good edge for enemy to leverage to dodge attacks.
A new `RemoteWeaponManager` is created to charge of creating/managing/sync across network for these remote weapons.