示例#1
0
    public static void ShowWorldBubble()
    {
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;

        BubbleUI.Flag[] bubbleFlagData          = EIcon.GetBubbleFlagData(EIcon.sFIconType);
        Action <PosObj, Obj, UInt32>[] listener = new Action <PosObj, Obj, UInt32>[]
        {
            new Action <PosObj, Obj, UInt32>(EventCollision.BubbleUIListener)
        };
        PosObj  controlChar     = instance.GetControlChar();
        Vector3 uidefaultOffset = BubbleUI.UIDefaultOffset;

        if (controlChar.go == (UnityEngine.Object)null)
        {
            return;
        }
        if (EventCollision.IsChocoboFlyingOverForest() || (EIcon.dialogBubble && EIcon.dialogAlternativeKey))
        {
            Singleton <BubbleUI> .Instance.ChangePrimaryKey(Control.Cancel);

            EIcon.dialogAlternativeKey = false;
        }
        else
        {
            Singleton <BubbleUI> .Instance.ChangePrimaryKey(Control.Confirm);
        }
        EIcon.ShowDelay = Singleton <BubbleUI> .Instance.AnimationDuration;
        Vector3 transformOffset;

        EIcon.GetWorldActorOffset(out transformOffset, ref uidefaultOffset);
        Singleton <BubbleUI> .Instance.Show(controlChar.go.transform, controlChar, (Obj)null, EIcon.WorldCamera, transformOffset, uidefaultOffset, bubbleFlagData, listener);
    }
示例#2
0
    public void UpdateWorldActor(PosObj po)
    {
        Vector3 uidefaultOffset = BubbleUI.UIDefaultOffset;
        Vector3 targetTransformOffset;

        EIcon.GetWorldActorOffset(out targetTransformOffset, ref uidefaultOffset);
        this.WorldFollower.target = po.go.transform;
        this.WorldFollower.targetTransformOffset = targetTransformOffset;
        this.WorldFollower.UIOffset = uidefaultOffset;
    }