Exemplo n.º 1
0
    private void UpdateDebugText()
    {
        if (!GameObject.Find("Program").GetComponent <ConsoleCommand>().IsDebugVisible())
        {
            thisEntity.SetDebugText("");
            return;
        }

        string debugMsg1 = "";

        // Show Nearby Entities
        foreach (KeyValuePair <EntityOLD, EntityOLD.Disposition> kvp in nearbyEntities)
        {
            debugMsg1 += (GetDisposition(kvp.Key) + " to " + kvp.Key.transform.name + "\n");
        }

        // Show Behavior
        debugMsg1 += currentBehaviorState.ToString();

        // Show Target
        if (targetEntity != null)
        {
            string targetName = targetEntity.transform.name;
            targetName = targetName.Replace("Pfb_Entity_", "");
            targetName = targetName.Replace("AI_", "");
            debugMsg1 += " " + GetDisposition(targetEntity) + " " + targetName;
        }

        // Show Health
        // debugMsg1 += "\n" + thisEntity.GetCurrentHealth() + "/" + thisEntity.GetMaxHealth();

        thisEntity.SetDebugText(debugMsg1);
    }