blob: fe8a9de84aec4085c050578f5205f52ffefa5eb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
using UnityEngine;
public class PerkDamageModifyerPlayerunitAuto : MonoBehaviour
{
private void Start()
{
PerkManager instance = PerkManager.instance;
if (instance.WarriorModeActive)
{
AutoAttack[] componentsInChildren = GetComponentsInChildren<AutoAttack>(includeInactive: true);
for (int i = 0; i < componentsInChildren.Length; i++)
{
componentsInChildren[i].DamageMultiplyer *= instance.warriorModeAllyDmgMulti;
}
}
if (instance.CommanderModeActive)
{
AutoAttack[] componentsInChildren = GetComponentsInChildren<AutoAttack>(includeInactive: true);
for (int i = 0; i < componentsInChildren.Length; i++)
{
componentsInChildren[i].DamageMultiplyer *= instance.commanderModeAllyDmgMulti;
}
}
Object.Destroy(this);
}
}
|