Exemplo n.º 1
0
    void GiveDamage(GameObject target)
    {
        EntityDamage target_damage_system = (EntityDamage)target.GetComponent("EntityDamage");

        if (target_damage_system == null || target.CompareTag(gameObject.tag))
        {
            return;
        }

        target_damage_system.TakeDamage(damage);
    }
Exemplo n.º 2
0
 public static bool DamageResponse_Prefix(EntityAlive __instance, DamageResponse _dmResponse)
 {
     try
     {
         if (EntityDamage.IsEnabled || Zones.IsEnabled || Lobby.IsEnabled || Market.IsEnabled)
         {
             return(EntityDamage.ProcessEntityDamage(__instance, _dmResponse));
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in Injections.DamageResponse_Prefix: {0}", e.Message));
     }
     return(true);
 }
Exemplo n.º 3
0
 void Start()
 {
     hp_status     = GetComponentInChildren <Text>();
     entity        = transform.parent.gameObject;
     damage_system = entity.GetComponent <EntityDamage>();
 }
Exemplo n.º 4
0
 void Start()
 {
     text          = gameObject.GetComponent <Text>();
     damage_system = player.GetComponent <EntityDamage>();
 }