public void UCE_AddMessage(string message, byte color = 0, bool show = true)
    {
        if (message == "")
        {
            return;
        }

        if (UCE_infobox == null)
        {
            UCE_infobox = GetComponent <UCE_InfoBox>();
        }

        if (UCE_infobox)
        {
            UCE_infobox.AddMessage(message, color, show);
        }
    }
Пример #2
0
 // -----------------------------------------------------------------------------------
 // UCE_TargetAddMessage
 // -----------------------------------------------------------------------------------
 public void UCE_TargetAddMessage(string message, byte color = 0)
 {
     if (message == "")
     {
         return;
     }
     if (UCE_infobox == null)
     {
         UCE_infobox = GetComponent <UCE_InfoBox>();
     }
     if (UCE_infobox)
     {
         UCE_infobox.TargetAddMessage(connectionToClient, message, color);
     }
     else
     {
         Debug.LogWarning("You forgot to assing UCE_InfoBox component to your player prefab");
     }
 }
    public override void UCE_TargetAddMessage(string message, byte color = 0, bool show = true)
    {
        if (message == "")
        {
            return;
        }

        if (this == Player.localPlayer)
        {
            UCE_AddMessage(message, color, show);
            return;
        }

        if (UCE_infobox == null)
        {
            UCE_infobox = GetComponent <UCE_InfoBox>();
        }

        if (UCE_infobox)
        {
            UCE_infobox.TargetAddMessage(connectionToClient, message, color, show);
        }
    }