summaryrefslogtreecommitdiff
path: root/GameCode/BlockEffectCounter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'GameCode/BlockEffectCounter.cs')
-rw-r--r--GameCode/BlockEffectCounter.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/GameCode/BlockEffectCounter.cs b/GameCode/BlockEffectCounter.cs
new file mode 100644
index 0000000..56c7e39
--- /dev/null
+++ b/GameCode/BlockEffectCounter.cs
@@ -0,0 +1,21 @@
+using UnityEngine;
+
+public class BlockEffectCounter : BlockEffect
+{
+ public int ownAttacksToSendBack;
+
+ private SpawnObjectEffect spawn;
+
+ private void Start()
+ {
+ spawn = GetComponentInParent<SpawnObjectEffect>();
+ }
+
+ public override void DoBlockedProjectile(GameObject projectile, Vector3 forward, Vector3 hitPos)
+ {
+ for (int i = 0; i < ownAttacksToSendBack; i++)
+ {
+ spawn.DoEffect(forward);
+ }
+ }
+}