Exemplo n.º 1
0
        public override void OnEnter()
        {
            var target = Fsm.GetOwnerDefaultTarget(gameObject);

            if (storeTextureResult != null)
            {
                storeTextureResult.Value = null;
                if (target != null)
                {
                    var actor = DialogueManager.MasterDatabase.GetActor(DialogueActor.GetActorName(target.transform));
                    if (actor != null)
                    {
                        if (portraitNumber.Value == 0)
                        {
                            storeTextureResult.Value = actor.GetPortraitTexture(1);
                        }
                        else
                        {
                            storeTextureResult.Value = actor.GetPortraitTexture(portraitNumber.Value);
                        }
                    }
                }
            }
            Finish();
        }
Exemplo n.º 2
0
        public override void OnEnter()
        {
            var target = Fsm.GetOwnerDefaultTarget(gameObject);

            if (storeStringResult != null)
            {
                if (target == null || target.gameObject == null)
                {
                    storeStringResult.Value = null;
                }
                else
                {
                    var go = target.gameObject;
                    if (getInternalName == null || getInternalName.Value == false)
                    {
                        storeStringResult.Value = DialogueActor.GetActorName(go.transform);
                    }
                    else
                    {
                        storeStringResult.Value = DialogueActor.GetPersistentDataName(go.transform);
                    }
                }
            }
            Finish();
        }