예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        uiManager_   = UIManager.Instance;
        flagManager_ = FlagManager.Instance;

        // If NPC still has dialogue, show it as interactible.
        UnityAction <FlagManager.EventFlag> checkStillInteractible =
            new UnityAction <FlagManager.EventFlag>((FlagManager.EventFlag flag) =>
        {
            if (currTalkableNPC_ == null)
            {
                return;
            }

            currTalkableNPC_.SetInteractable(currTalkableNPC_.HasAvailableModel());
        });

        flagManager_.AddListener(checkStillInteractible);
        uiManager_.Player = this;

        isWeb = Application.platform != RuntimePlatform.WebGLPlayer;


        dialogueCompletedCb_ = () =>
        {
            state_ = PlayerDialogueState.Inactive;
            return(true);
        };
    }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     flagManager_   = FlagManager.Instance;
     volumeManager_ = VolumeManager.Instance;
     flagManager_.AddListener(OnFlagFlipped);
     SetHasInteraction(false);
     animator_    = GetComponent <Animator>();
     audioSource_ = GetComponent <AudioSource>();
 }
예제 #3
0
파일: Flower.cs 프로젝트: ttanatb/TakeCare
    // Start is called before the first frame update
    void Start()
    {
        flagManager_            = FlagManager.Instance;
        eventFlagToAnimStrings_ = new Dictionary <FlagManager.EventFlag, Sprite>();
        foreach (EventFlagSpritePair pair in eventFlagAnimPairs_)
        {
            eventFlagToAnimStrings_.Add(pair.EventFlag, pair.Sprite);
        }

        flagManager_.AddListener(OnFlagFlipped);
    }
예제 #4
0
    // Start is called before the first frame update
    void Start()
    {
        flagManager_ = FlagManager.Instance;
        flagManager_.AddListener(OnFlagFlipped);
        prevPos = transform.position;

        renderers_ = GetComponentsInChildren <Renderer>();
        foreach (Renderer r in renderers_)
        {
            r.enabled = false;
        }
    }
예제 #5
0
    // Start is called before the first frame update
    void Start()
    {
        flagManager_ = FlagManager.Instance;
        flagManager_.AddListener(OnFlagFlipped);

        SetImagePanelShowOrHide(false);

        eventFlagToAnimBoolString_ = new Dictionary <FlagManager.EventFlag, Sprite>();
        foreach (EventFlagImagePair pair in eventFlagAnimBoolStringPairs_)
        {
            eventFlagToAnimBoolString_.Add(pair.EventFlag, pair.Image);
        }
    }
예제 #6
0
    // Start is called before the first frame update
    void Start()
    {
        flagManager_            = FlagManager.Instance;
        animator_               = GetComponent <Animator>();
        eventFlagToAnimStrings_ = new Dictionary <FlagManager.EventFlag, string>();
        foreach (EventFlagAnimStringPair pair in eventFlagAnimPairs_)
        {
            eventFlagToAnimStrings_.Add(pair.EventFlag, pair.AnimString);
        }


        flagManager_.AddListener(OnFlagFlipped);
    }
예제 #7
0
    // Start is called before the first frame update
    void Start()
    {
        eventFlagToCamMovement_ = new Dictionary <FlagManager.EventFlag, PositionAndSize>();
        foreach (EventFlagCameraMovementPair pair in eventFlagAnimPairs_)
        {
            eventFlagToCamMovement_.Add(pair.EventFlag, pair.PosAndZoom);
        }

        camera_ = GetComponent <Camera>();

        flagManager_ = FlagManager.Instance;
        flagManager_.AddListener(OnFlagFlipped);
    }
예제 #8
0
    // Start is called before the first frame update
    void Start()
    {
        flagManager_   = FlagManager.Instance;
        volumeManager_ = VolumeManager.Instance;
        flagManager_.AddListener(OnFlagFlipped);


        eventFlagToAnimBoolString_ = new Dictionary <FlagManager.EventFlag, AudioClip>();
        foreach (EventFlagAudioClipPair pair in eventFlagAnimBoolStringPairs_)
        {
            eventFlagToAnimBoolString_.Add(pair.EventFlag, pair.AudioClip);
        }
    }
예제 #9
0
    // Start is called before the first frame update
    void Start()
    {
        flagManager_ = FlagManager.Instance;
        animator_    = GetComponent <Animator>();
        eventFlagToAnimBoolString_ = new Dictionary <FlagManager.EventFlag, string>();
        foreach (EventFlagAnimBoolStringPair pair in eventFlagAnimBoolStringPairs_)
        {
            eventFlagToAnimBoolString_.Add(pair.EventFlag, pair.Sprite);
        }

        flagManager_.AddListener(OnFlagFlipped);

        prevPos = transform.position;
    }
예제 #10
0
    // Start is called before the first frame update
    void Start()
    {
        flagManager_            = FlagManager.Instance;
        eventFlagToAnimStrings_ = new Dictionary <FlagManager.EventFlag, RendererAndSprite[]>();
        foreach (EventFlagRendererSpritePair pair in eventFlagAnimPairs_)
        {
            RendererAndSprite[] array = new RendererAndSprite[pair.RendererAndSprites.Length];
            pair.RendererAndSprites.CopyTo(array, 0);

            eventFlagToAnimStrings_.Add(pair.EventFlag, array);
        }


        flagManager_.AddListener(OnFlagFlipped);
    }
예제 #11
0
    private void Start()
    {
        flagManager_ = FlagManager.Instance;

#if UNITY_EDITOR
        if (soModel_ == null && soAssetName != "")
        {
            soModel_ = (DialogueModelSO)AssetDatabase.
                       LoadAssetAtPath("Assets/DialogueModels/" +
                                       soAssetName + ".asset", typeof(DialogueModelSO));
        }
#endif
        if (interactbleText_ == null)
        {
            interactbleText_ = GetComponentInChildren <TextMeshPro>();
        }
        CheckIfInteractible(0);

        flagManager_.AddListener(CheckIfInteractible);
    }
예제 #12
0
 // Start is called before the first frame update
 void Start()
 {
     flagManager_ = FlagManager.Instance;
     flagManager_.AddListener(OnEventFlagCompleted);
     talkableNPC = GetComponent <TalkableNPC>();
 }