Example #1
0
    public void OnInteractableSelected(int InteractableID)
    {
        StoryPresentation StoryPresentationScript = FindObjectOfType <StoryPresentation>();

        // A little fuggly here as the InteractableID inverst because of the Grid Layout Group
        // attached to the Interactable area. It turns out that as you add items it inverts
        // the Interactable ID. Its okay now that it is unsderstood we just simply invert it back.
        StoryPresentationScript.Open(currInteractable.items[InteractableID]);

        // register the callback
        StoryPresentationScript.StoryItemClicked += OnStoryItemClickedHandler;
    }
Example #2
0
        public async void UsersForPresentations(int uc, int presentationId)
        {
            SCLM sclm = await Utilities.GetContextAsync(uc);

            string[] usersIds = { "31e806b7-56b2-4560-ad39-2fa1a382a9d2", "d0532be9-d6d8-4401-8155-01e309f87aa7", "b2b68ca3-4e7b-4e36-b29e-dbcc06585065" };

            StoryPresentation presentation = await sclm.GetPresentationAsync(presentationId);

            Assert.NotNull(presentation);

            await presentation.RemoveAllUsersAsync();

            Assert.True(presentation.Users.Count() == 0);

            var users = await presentation.AddUsersAsync(usersIds);

            Assert.True(presentation.Users.Count() == 3);

            users = await presentation.AddUsersAsync(usersIds);

            Assert.True(presentation.Users.Count() == 3);
        }