Beispiel #1
0
    protected void SetUp()
    {
        RenderProfileManifest.i.Initialize();

        sceneHandler = Substitute.For <ISceneHandler>();

        var allLoadedParcelCoords = new HashSet <Vector2Int>();

        allLoadedParcelCoords.Add(new Vector2Int(0, 0));
        allLoadedParcelCoords.Add(new Vector2Int(-1, 0));
        allLoadedParcelCoords.Add(new Vector2Int(-1, 1));

        sceneHandler.GetAllLoadedScenesCoords().Returns(allLoadedParcelCoords);

        blockerAnimationHandler = Substitute.For <IBlockerAnimationHandler>();

        //NOTE(Brian): Call OnFinish() when blockerAnimationHandler.FadeOut is called.
        blockerAnimationHandler.FadeOut(Arg.Any <GameObject>(), Arg.Invoke());

        blockerInstanceHandler = new BlockerInstanceHandler(new DCLCharacterPosition(), blockerAnimationHandler);

        blockersParent = new GameObject();

        blockerInstanceHandler.SetParent(blockersParent.transform);
    }
Beispiel #2
0
        public void HideBlocker(Vector2Int coords, bool instant = false)
        {
            if (instant)
            {
                ReleaseBlocker(coords);
                return;
            }

            animationHandler.FadeOut(
                blockers[coords].gameObject,
                () => ReleaseBlocker(coords)
                );
        }