Exemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void HandleLevelChange(int pDirection)
        {
            DestroyPrevLevel();
            vPrevLevelObj = vCurrLevelObj;

            if (vPrevLevelObj != null)
            {
                vPrevLevelObj.name = "PrevLevel";
            }

            ////

            vCurrLevelObj = new GameObject("CurrLevel");
            vCurrLevelObj.transform.SetParent(gameObject.transform, false);

            UiLevel level = vCurrLevelObj.AddComponent <UiLevel>();

            level.Build(vArcState, vCustom);

            ////

            vChangeTime = DateTime.UtcNow;
            vChangeDir  = pDirection;
            UpdateItemChangeAnim();
        }
Exemplo n.º 2
0
        /*--------------------------------------------------------------------------------------------*/
        internal void UpdateAfterSideChange()
        {
            vPrevLevelObj = vCurrLevelObj;
            DestroyPrevLevel();

            vCurrLevelObj = new GameObject("CurrLevel");
            vCurrLevelObj.transform.SetParent(gameObject.transform, false);
            vCurrLevelObj.transform.localScale = Vector3.one;

            UiLevel level = vCurrLevelObj.AddComponent <UiLevel>();

            level.Build(vArcState, vCustom);
            level.HandleChangeAnimation(true, 0, 1);
        }