This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial Scattershock implementation
- Loading branch information
1 parent
b4f5bc5
commit 93e39f3
Showing
10 changed files
with
494 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Godot; | ||
|
||
|
||
public static class Scattershock | ||
{ | ||
public static float VerticalRecoil = 22; | ||
public static float RecoilLength = 4; | ||
public static float Range = 500; | ||
public static float AngularOffset = 2f; | ||
public static float HeadshotDamage = 30; | ||
public static float BodyshotDamage = 25; | ||
public static float LegshotDamage = 10; | ||
public static float FireCooldown = 55; | ||
|
||
public static void Fire(Items.Instance Item, Player UsingPlayer) | ||
{ | ||
{ | ||
float Multiplyer = 1; | ||
if(Game.PossessedPlayer.Ads) | ||
Multiplyer = Game.PossessedPlayer.AdsMultiplyer; | ||
|
||
for(int x = -1; x <= 1; x++) | ||
{ | ||
for(int y = -1; y <= 1; y++) | ||
{ | ||
Hitscan.Fire(x*AngularOffset*Multiplyer, y*AngularOffset*Multiplyer, Range, HeadshotDamage, BodyshotDamage, LegshotDamage); | ||
} | ||
} | ||
} | ||
|
||
Hitscan.ApplyAdditiveRecoil(VerticalRecoil, RecoilLength); | ||
|
||
UsingPlayer.SetCooldown(0, FireCooldown, true); | ||
UsingPlayer.SfxManager.FpThunderboltFire(); //TODO: Add scattershock fire sfx | ||
} | ||
} |
Oops, something went wrong.