示例#1
0
    private void CreateNotification(Vector3 position, string text, float duration, string color)
    {
        GameObject        worldNotificationObj = Instantiate(worldNotificationPrefab);
        WorldNotification worldNotification    = worldNotificationObj.GetComponent <WorldNotification>();

        worldNotification.InitializeAndStart(new WorldNotificationArgs(position, text, duration, color));
    }
示例#2
0
    public void ShowLocalNotification(WorldNotificationArgs worldNotificationArgs)
    {
        GameObject        worldNotificationObj = Instantiate(worldNotificationPrefab);
        WorldNotification worldNotification    = worldNotificationObj.GetComponent <WorldNotification>();

        worldNotification.InitializeAndStart(worldNotificationArgs);
    }