250319

lililllilillll·2025년 3월 19일

개발 일지

목록 보기
115/350

✅ What I did today


  • Project BCA


🎮 Project BCA


static 일일이 켰다 껐다 할 필요 없었다.
light probe 배워놓고 까먹음.

Modify terminal text code to reuse it

[CreateAssetMenu(fileName = "TerminalScript", menuName = "ScriptableObjects/TerminalScript", order = 1)]
public class TerminalScript : ScriptableObject
{
    [SerializeField] public IntroOrEnding introOrEnding;
    [SerializeField] public string[] introTexts;

    [Tooltip("bool이 true면 해당하는 인덱스의 텍스트가 기존 텍스트와 함께 출력")]
    [SerializeField] public bool[] introTextType;
}

연출 상 terminal에 텍스트 뿌리는거 재사용 해야해서
기존에 monobehaviour의 serialized field로 넣어줬던 걸
scriptable object로 교체

    private void NextTerminalTexts()
    {
        // 모든 텍스트 출력했다면 flag에 따라 다음 동작 수행
        if (textIdx == introTexts.Length)
        {
            switch (currentScript.introOrEnding)
            {
                case IntroOrEnding.Intro:
                    Cursor.lockState = CursorLockMode.None;
                    Cursor.visible = true;
                    isWatchingMonitor = false;
                    ChangeVcam(playing_vcam);
                    gameManager.StartGame();
                    break;
                case IntroOrEnding.Ending:
                    ChangeVcam(walking_vcam);
                    walking_player.SetActive(true);
                    Destroy(this);
                    break;
            }

            return;
        }

경우의 수 2가지밖에 없어서 enum flag로 대충 명시적으로만 구분해둠

profile
너 정말 **핵심**을 찔렀어

0개의 댓글