public void ShowLocalNotification(WorldNotificationArgs worldNotificationArgs) { GameObject worldNotificationObj = Instantiate(worldNotificationPrefab); WorldNotification worldNotification = worldNotificationObj.GetComponent <WorldNotification>(); worldNotification.InitializeAndStart(worldNotificationArgs); }
public void InitializeAndStart(WorldNotificationArgs worldNotificationArgs) { transform.position = worldNotificationArgs.Position; textMesh.text = worldNotificationArgs.Text; textMesh.color = GetColorByName(worldNotificationArgs.Color); duration = worldNotificationArgs.Duration; StartCoroutine(PlayDefaultAnimation()); }
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); } }