[TIL] 74 UI,TimeScale โญโญ

์—…๋ฐ์ดํŠธ:

์นดํ…Œ๊ณ ๋ฆฌ:

ํƒœ๊ทธ: , ,


``



์ตœ์ข… ํŒ€ ํ”„๋กœ์ ํŠธ 17์ผ์ฐจ

ย ย  [o] ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ - 53
ย ย  [o] ๋ฉด์ ‘ ๋ฌธ์ œ ํ’€๊ธฐ - 5
ย ย  [o] 1,2๋ฐ˜ ๋งˆ๋ฌด๋ฆฌ์ •๋ฆฌ ์ฑŒ~
ย ย  [x] ์‹ฌํ™”์ฃผ์ฐจ ๊ฐ•์˜ ๋“ฃ๊ธฐ.
ย ย  [x] ๋””์ž์ธ ์ฝ”๋“œ ํŒจํ„ด ์ดํ•ด,์ •๋ฆฌํ•˜๊ธฐ.
ย ย  [x] ์ž๋ฃŒ๊ตฌ์กฐ ๋””์ž์ธํŒจํ„ด ๊ฐ•์˜ ๋‹ค์‹œ ๋“ฃ๊ธฐ.







๋ฐœํ‘œ ์ž๋ฃŒ

์ค‘๊ฐ„ ๋ฐœํ‘œ ์ž๋ฃŒ







UIManager์—์„œ Inven, Shop ๊ด€๋ฆฌ

๊ด€๋ จ ๋ฒ„๊ทธ ์ˆ˜์ •.







UI ํ™œ์„ฑํ™” ์‹œ ์‹œ๊ฐ„, ์นด๋ฉ”๋ผ ๋ฉˆ์ถค

// ์›๋ž˜ ์บ  ์†๋„ ์ €์žฅ
public void SaveCamSpeed()
{
    CamaraSpeed = VirtualcameraPov.m_VerticalAxis.m_MaxSpeed;
}

// UI ํ™œ์„ฑํ™” ์‹œ ์นด๋ฉ”๋ผ, ์‹œ๊ฐ„ ๋ฉˆ์ถ”๊ธฐ
public void DontMoveCam() 
{
    VirtualcameraPov.m_VerticalAxis.m_MaxSpeed = 0;
    VirtualcameraPov.m_HorizontalAxis.m_MaxSpeed = 0;
    Cursor.lockState = CursorLockMode.None;
    Time.timeScale = 0.01f;
    
}

// ์›๋ž˜ ์บ  ์†๋„๋กœ ๋˜๋Œ๋ฆฌ๊ธฐ
public void ReturnCamSpeed()
{
    Time.timeScale = 1f;
    if (CamaraSpeed==0)
    {
        CamaraSpeed = GameManager.Instance.UIManager.CameraSpeed;
    }
    VirtualcameraPov.m_VerticalAxis.m_MaxSpeed = CamaraSpeed;
    VirtualcameraPov.m_HorizontalAxis.m_MaxSpeed = CamaraSpeed;
    Cursor.lockState = CursorLockMode.Locked;
}

Setting์—์„œ ์นด๋ฉ”๋ผ ๊ฐ๋„ ์กฐ์ ˆ์‹œ ๋ฒ„๊ทธ ๋ฐœ์ƒ ์Šคํฌ๋กค ๋ณ€๊ฒฝ ์‹œ CamaraManager์— ์žˆ๋Š” CamaraSpeed๋กœ ์ €์žฅ







๊ธฐ์ˆ ๋ฉด์ ‘

์Šคํƒ, ํž™ ๋ฉ”๋ชจ๋ฆฌ๋ž€ ๋ฌด์—‡์ด๋ฉฐ ์ฐจ์ด

์Šคํƒ ๋ฉ”๋ชจ๋ฆฌ : ์ž ์‹œ ์‚ฌ์šฉํ•˜๊ณ  ์‚ญ์ œํ•˜๋Š” ๋ฐ์ดํ„ฐ ์ €์žฅ(์ง€์—ญ๋ณ€์ˆ˜, ๋งค๊ฐœ๋ณ€์ˆ˜) ์ง€์—ญ์ด ๋๋‚˜๋ฉด ํ•ด์ œ๋œ๋‹ค, ๊ฐ’ํ˜•์‹, ํž™๋ณด๋‹ค ๋น ๋ฆ„
ํž™ ๋ฉ”๋ชจ๋ฆฌ : ์Šคํƒ๋ณด๋‹ค ํฐ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํ• ๋‹น๋ฐ›๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ, ๋™์  ๋ฉ”๋ชจ๋ฆฌ ํ• ๋‹น (NEW), ์Šคํƒ๋ณด๋‹ค ๋Š๋ฆผ. Delete๋ฅผ ์ด์šฉํ•ด ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ ๋ฐ˜ํ™˜.GC๊ฐ€ ์—†์œผ๋ฉด ์ง์ ‘ ๊ด€๋ฆฌ ํ•ด์•ผ์ค˜์•ผ ํ•จ
์Šคํƒ์—๋Š” ํž™์˜ ์ฃผ์†Œ๊ฐ€ ํž™๋ฉ”๋ชจ๋ฆฌ์—๋Š” ์‹ค์ œ ์ฃผ์†Œ๊ฐ’์ด ์ €์žฅ๋œ๋‹ค.







์žก๋‹ด,์ •๋ฆฌ

๋ฐœํ‘œ ์ž๋ฃŒ ์ค€๋น„ ํŠธ๋Ÿฌ๋ธ” ์ŠˆํŒ…, ๊ฒŒ์ž„ ๋ฒ„๊ทธ ํ”ฝ์Šค




์ฐธ๊ณ  : ์œ ๋‹ˆํ‹ฐ TOP




๐Ÿ“”

๋Œ“๊ธ€๋‚จ๊ธฐ๊ธฐ