5 override void OnInit(IEntity pOwnerEntity, GenericComponent pManagerComponent)
7 super.OnInit(pOwnerEntity, pManagerComponent);
9 array<string> colliderNames = {};
10 GetAllColliderNames(colliderNames);
11 if (colliderNames.IsEmpty())
14 Physics physics = pOwnerEntity.GetPhysics();
18 SCR_PowerComponent powerComp = SCR_PowerComponent.Cast(pOwnerEntity.FindComponent(SCR_PowerComponent));
24 foreach (
string colliderName: colliderNames)
26 if (physics.GetGeom(colliderName) == -1)
29 powerComp.RegisterBatteryHitZone(
this);
38 override void OnDamageStateChanged()
40 SCR_PowerComponent powerComp = SCR_PowerComponent.Cast(
GetOwner().FindComponent(SCR_PowerComponent));
42 powerComp.UpdatePowerState();