Rapid Fire User input
1 – When the user presses the mouse left button
it will invoke ClientRapidFiring.LocalPlayerStartedRapidFiring() this method will Process the StartRapidFireClientAction with the necessary data
2 – If the user still holding the left button
ClientRapidFiring.UpdateRapidFiring() will run every certain time and it will invoke UpdateRapidFireEntityClientAction , this will update the bearing of the rapid fire component every certain time
Serve side
- StartRapidFireServerAction invoked when the user start rapid fire this will,
After StartRapidFireServerAction started the firing it will invoke FireRapidFireTargetsAction.cs every certain time - FireRapidFireTargetsAction is concerned with verifying the targets into the rapid fire entity range and on the same bearing line of it. also it calculates the target damage depending on the time between every schedule convert it to and the DamageAmountForOneFire.
- UpdateRapidFireWeaponServerAction.cs will get the new bearing every certain time and firing status *still firing or not*
to update the rapid fire entity and notify the clients about it. - UpdateRapidFireWeaponServerAction wil SendEventToBattleRoom FireRapidFireServerEventDecorator with rapid fire information *is firring* ,*bearing* and its * range*so all the clients update the rapid fire visual “RapidFireVisuals.cs” depending on that information.
Recent Comments