Merge branch 'main' into DO-46-게임-씬-보조-기능-추가
This commit is contained in:
commit
eb873e6d13
@ -14,7 +14,7 @@ GameObject:
|
|||||||
- component: {fileID: 6789969287113785900}
|
- component: {fileID: 6789969287113785900}
|
||||||
- component: {fileID: 413977444317235173}
|
- component: {fileID: 413977444317235173}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Switch
|
m_Name: BGM Switch
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -762,7 +762,7 @@ GameObject:
|
|||||||
- component: {fileID: 3464089222698319368}
|
- component: {fileID: 3464089222698319368}
|
||||||
- component: {fileID: 8434701791193156984}
|
- component: {fileID: 8434701791193156984}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Switch
|
m_Name: SFX Switch
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
@ -19,7 +19,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
private Dictionary<string, AudioClip> audioClips = new Dictionary<string, AudioClip>();
|
private Dictionary<string, AudioClip> audioClips = new Dictionary<string, AudioClip>();
|
||||||
|
|
||||||
|
|
||||||
private void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake(); // 부모 클래스의 Awake 호출
|
base.Awake(); // 부모 클래스의 Awake 호출
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ public class SwitchController : MonoBehaviour
|
|||||||
|
|
||||||
private RectTransform _handleRectTransform;
|
private RectTransform _handleRectTransform;
|
||||||
private Image _backgroundImage;
|
private Image _backgroundImage;
|
||||||
private AudioSource _audioSource;
|
|
||||||
|
|
||||||
private bool _isOn;
|
private bool _isOn;
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ public class SwitchController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
_handleRectTransform = handleImage.GetComponent<RectTransform>();
|
_handleRectTransform = handleImage.GetComponent<RectTransform>();
|
||||||
_backgroundImage = GetComponent<Image>();
|
_backgroundImage = GetComponent<Image>();
|
||||||
_audioSource = GetComponent<AudioSource>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
@ -35,7 +33,15 @@ public class SwitchController : MonoBehaviour
|
|||||||
//초기 상태는 false
|
//초기 상태는 false
|
||||||
_handleRectTransform.anchoredPosition = new Vector2(-14, 0);
|
_handleRectTransform.anchoredPosition = new Vector2(-14, 0);
|
||||||
_backgroundImage.color = OffColor;
|
_backgroundImage.color = OffColor;
|
||||||
_isOn = false;
|
|
||||||
|
if (gameObject.name == "SFX Switch")
|
||||||
|
{
|
||||||
|
_isOn = UserManager.IsPlaySFX;
|
||||||
|
}
|
||||||
|
else if (gameObject.name == "BGM Switch")
|
||||||
|
{
|
||||||
|
_isOn = UserManager.IsPlayBGM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//스위치 상태 변경 함수
|
//스위치 상태 변경 함수
|
||||||
|
Loading…
x
Reference in New Issue
Block a user