示例#1
0
        private void ExecuteInteraction(ActorInteractionType type, string target, ActionSpecial special, ActionInvokerData data)
        {
            switch (type)
            {
            case ActorInteractionType.None:
                break;     //do nothing

            case ActorInteractionType.Special:
                special.Execute(data);
                break;

            case ActorInteractionType.AmbientMonologue:
                string msg = DialogueModule.GetMonologue(target).GetLineRandom();     //VERY inefficient, will fix later
                //QdmsMessageBus.Instance.PushBroadcast(new HUDPushMessage(msg));//also a very temporary display
                QdmsMessageBus.Instance.PushBroadcast(new SubtitleMessage(msg, 5.0f, true, -1));
                //and we need to rework Monologue and implement an audio manager before we can do speech
                break;

            case ActorInteractionType.Dialogue:
                DialogueInitiator.InitiateDialogue(target, true, null);
                break;

            case ActorInteractionType.Script:
                ScriptingModule.Call(target, new ScriptExecutionContext()
                {
                    Caller = this, Activator = data.Activator.gameObject
                }, new object[] { });
                break;

            default:
                throw new NotImplementedException();
            }
        }
        public override void Execute(ActionInvokerData data)
        {
            if (Locked || (!AllowInvokeWhenDisabled && !isActiveAndEnabled))
            {
                return;
            }

            DialogueInitiator.InitiateDialogue(Dialogue, Pause, null, TargetIsThis ? gameObject.name : null);

            if (!Repeatable)
            {
                Locked = true;
            }
        }
示例#3
0
    private void SetUpDialogue()
    {
        leftPersonImage.sprite  = dialogue.GetLeftSprite();
        rightPersonImage.sprite = dialogue.GetRightSprite();

        DialogueInitiator initiator = dialogue.GetInitiator();

        dialogueText = initiator == DialogueInitiator.Right ? leftPersonText : rightPersonText;//especially wrong behaviour to change it further

        HeroTypeName leftPerson = dialogue.GetLeftName();

        InitializePersonName(leftPerson, leftNameText);
        HeroTypeName rightPerson = dialogue.GetRightName();

        InitializePersonName(rightPerson, rightNameText);
    }
示例#4
0
        public override void Execute(ActionInvokerData data)
        {
            if (!enabled && !AllowInvokeWhenDisabled)
            {
                return;
            }

            if (Triggered && !Repeatable)
            {
                return;
            }

            string target = null;

            switch (Target)
            {
            case TargetType.Activator:
                target = data.Activator.Ref()?.gameObject.name;
                break;

            case TargetType.NearestController:
                target = GetComponentInParent <BaseController>().Ref()?.gameObject.name;
                break;

            case TargetType.ByTID:
                target = TargetId;
                break;

            case TargetType.ByReference:
                target = TargetReference.name;
                break;
            }

            DialogueInitiator.SetDynamicDialogue(ImmersiveMonologue.BuildDialogueScene());
            DialogueInitiator.InitiateDialogue(DialogueModule.DynamicDialogueName, Pause, null, target);

            Triggered = true;
        }