コード例 #1
0
    public void ShowLocalNotification(WorldNotificationArgs worldNotificationArgs)
    {
        GameObject        worldNotificationObj = Instantiate(worldNotificationPrefab);
        WorldNotification worldNotification    = worldNotificationObj.GetComponent <WorldNotification>();

        worldNotification.InitializeAndStart(worldNotificationArgs);
    }
コード例 #2
0
    public void InitializeAndStart(WorldNotificationArgs worldNotificationArgs)
    {
        transform.position = worldNotificationArgs.Position;
        textMesh.text      = worldNotificationArgs.Text;
        textMesh.color     = GetColorByName(worldNotificationArgs.Color);
        duration           = worldNotificationArgs.Duration;

        StartCoroutine(PlayDefaultAnimation());
    }
コード例 #3
0
 public void ShowNotification(WorldNotificationArgs worldNotificationArgs, bool includeLocal)
 {
     if (includeLocal)
     {
         photonView.RPC("CreateNotification", PhotonTargets.All, worldNotificationArgs.Position, worldNotificationArgs.Text, worldNotificationArgs.Duration, worldNotificationArgs.Color);
     }
     else
     {
         photonView.RPC("CreateNotification", PhotonTargets.Others, worldNotificationArgs.Position, worldNotificationArgs.Text, worldNotificationArgs.Duration, worldNotificationArgs.Color);
     }
 }