コード例 #1
0
ファイル: BillBoard.cs プロジェクト: Hengle/AdvSystemV3
        public override void OnEnter()
        {
            BillboardOptions options = new BillboardOptions();

            options.billboardSprite    = spriteBillboard;
            options.billboardDiceAtlas = spriteAtlas;
            if (spriteDynamicBillboard == null && spriteAtlas != null)
            {
                spriteDynamicBillboard = spriteAtlas.GetSpriteContainName("Normal");
            }
            options.billboardDiceSprite = spriteDynamicBillboard;
            options.display             = display;
            options.fromPosition        = fromPosition;
            options.toPosition          = toPosition;
            options.toPositionShift     = positionShift;
            options.shiftAmount         = positionShiftAmount;
            options.toDistance          = spriteDistance;
            options.hideWhich           = hideWhich;
            options.flipFace            = flipFace;
            options.useDefaultSettings  = useDefaultSettings;
            options.fadeDuration        = fadeDuration;
            options.moveDuration        = moveDuration;
            options.shiftOffset         = shiftOffset;
            options.move              = move;
            options.shiftIntoPlace    = shiftIntoPlace;
            options.waitUntilFinished = waitUntilFinished;

            targetStage = AdvManager.Instance.advStage;
            targetStage.BillboardLayout.RunBillboardCommand(options, Continue); // 已在 callback 加上 Continue, 因此此指令執行完時直接 Continue
            //targetStage.RunBillboardCommand(options, Continue);
        }
コード例 #2
0
        public override void OnEnter()
        {
            System.Action <GameObject> onSpawn = (obj) => {
                UIBillboardController copyController = obj.GetComponent <UIBillboardController>();
                if (copyController != null)
                {
                    copyController.SetInitDisplay(useEmoji, useBody, useEquips);
                }
            };

            BillboardOptions options = new BillboardOptions();

            options.display            = display;
            options.fromPosition       = fromPosition;
            options.toPosition         = toPosition;
            options.toPositionShift    = positionShift;
            options.shiftAmount        = positionShiftAmount;
            options.toDistance         = spriteDistance;
            options.hideWhich          = hideWhich;
            options.flipFace           = flipFace;
            options.useDefaultSettings = useDefaultSettings;
            options.fadeDuration       = fadeDuration;
            options.moveDuration       = moveDuration;
            options.shiftOffset        = shiftOffset;
            options.move              = move;
            options.shiftIntoPlace    = shiftIntoPlace;
            options.waitUntilFinished = waitUntilFinished;

            StageExtend   targetStage = AdvManager.Instance.advStage;
            RectTransform prefabRect  = null;

            if (targetPrefab != null)
            {
                prefabRect = targetPrefab.GetComponent <RectTransform>();
            }

            targetStage.BillboardGUILayout.RunBillboardGUIObjCommand(prefabRect, options, onSpawn, Continue); // 已在 callback 加上 Continue, 因此此指令執行完時直接 Continue
        }