Files
FueraDeEscala/Assets/Game Kit Controller/Documentation/Integrations/Universal AI/GKCUniversalAIDamageDetectionInterface.txt
Robii Aragon fd87a6ffd5 add ckg
plantilla base para movimiento básico
2026-02-05 05:07:55 -08:00

32 lines
940 B
Plaintext

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UniversalAI;
public class GKCUniversalAIDamageDetectionInterface : healthManagement
{
public UniversalDamageable mainUniversalDamageable;
bool damageComponentLocated;
public override void setDamageWithHealthManagement(float damageAmount,
Vector3 fromDirection, Vector3 damagePos, GameObject attacker, GameObject projectile,
bool damageConstant,
bool searchClosestWeakSpot, bool ignoreShield, bool
ignoreDamageInScreen, bool damageCanBeBlocked, bool
canActivateReactionSystemTemporally, int damageReactionID, int damageTypeID)
{
if (!damageComponentLocated)
{
mainUniversalDamageable = GetComponent<UniversalDamageable>();
damageComponentLocated = true;
}
if (damageComponentLocated)
{
mainUniversalDamageable.TakeDamage((int)damageAmount);
}
}
}