Ejemplo n.º 1
0
        public IEnumerator BeVisibleByDefault()
        {
            avatarModel.wearables = new List <string>()
            {
                SUNGLASSES_ID
            };

            yield return(avatarShape.ApplyChanges(JsonUtility.ToJson(avatarModel)));

            var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]);

            Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled));
        }
Ejemplo n.º 2
0
        public IEnumerator BeVisibleByDefault()
        {
            avatarModel.wearables = new List <string>()
            {
                SUNGLASSES_ID
            };

            avatarShape.UpdateFromModel(avatarModel);
            yield return(avatarShape.routine);

            var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]);

            Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled));
        }
Ejemplo n.º 3
0
        public IEnumerator NotBeHiddenByWrongGeneralHides()
        {
            var bandana = catalog.Get(BLUE_BANDANA_ID);

            bandana.hides         = new[] { "NonExistentCategory" };
            avatarModel.wearables = new List <string>()
            {
                SUNGLASSES_ID, BLUE_BANDANA_ID
            };
            yield return(avatarShape.ApplyChanges(JsonUtility.ToJson(avatarModel)));

            var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]);
            var bandanaController    = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[BLUE_BANDANA_ID]);

            Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled));
            Assert.IsTrue(bandanaController.myAssetRenderers.All(x => x.enabled));
        }
Ejemplo n.º 4
0
        public IEnumerator NotBeHiddenByOverrideHides()
        {
            var sunglasses = catalog.Get(SUNGLASSES_ID);
            var bandana    = catalog.Get(BLUE_BANDANA_ID);

            bandana.GetRepresentation(WearableLiterals.BodyShapes.MALE).overrideHides = new[] { sunglasses.category };
            avatarModel.wearables = new List <string>()
            {
                SUNGLASSES_ID, BLUE_BANDANA_ID
            };
            yield return(avatarShape.ApplyChanges(JsonUtility.ToJson(avatarModel)));

            var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]);
            var bandanaController    = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[BLUE_BANDANA_ID]);

            Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled));
            Assert.IsTrue(bandanaController.myAssetRenderers.All(x => x.enabled));
        }
Ejemplo n.º 5
0
        public IEnumerator BeHiddenByGeneralHides()
        {
            var sunglasses = catalog.Get(SUNGLASSES_ID);
            var bandana    = catalog.Get(BLUE_BANDANA_ID);

            bandana.hides         = new[] { sunglasses.category };
            avatarModel.wearables = new List <string>()
            {
                SUNGLASSES_ID, BLUE_BANDANA_ID
            };
            avatarShape.UpdateFromModel(avatarModel);
            yield return(avatarShape.routine);

            var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]);
            var bandanaController    = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[BLUE_BANDANA_ID]);

            Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => !x.enabled));
            Assert.IsTrue(bandanaController.myAssetRenderers.All(x => x.enabled));
        }