+ Title Ui 수정 + 전투 맵 이동 위치 수정 + 맵 입구 이미지 변경 + 풀잎 아이템 추가에 따른 Excel, Json, So 수정 + 타이탄 슬라임 맵에서 풀이 잘릴 때, 40% 확률로 풀잎을 드롭 + 타이탄 슬라임 젬스톤 위치 및 재질 변경 + AutoDropItem 프리팹 추가
63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
using System;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
namespace BlueWater.Titles
|
|
{
|
|
public class TitleMenuButton : MonoBehaviour, ISelectHandler, IDeselectHandler, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
[SerializeField, Required]
|
|
private Button _targetButton;
|
|
|
|
[SerializeField, Required]
|
|
private Image _selectedImage;
|
|
|
|
[SerializeField]
|
|
private Color _highlightedColor;
|
|
|
|
private Color _originalColor;
|
|
private bool _isQuitting;
|
|
|
|
private void Start()
|
|
{
|
|
_originalColor = _selectedImage.color;
|
|
}
|
|
|
|
private void OnApplicationQuit()
|
|
{
|
|
_isQuitting = true;
|
|
}
|
|
|
|
public void OnSelect(BaseEventData eventData)
|
|
{
|
|
_selectedImage.color = _originalColor;
|
|
_selectedImage.enabled = true;
|
|
}
|
|
|
|
public void OnDeselect(BaseEventData eventData)
|
|
{
|
|
_selectedImage.enabled = false;
|
|
}
|
|
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
if (EventSystem.current.currentSelectedGameObject == gameObject) return;
|
|
|
|
_selectedImage.color = _highlightedColor;
|
|
_selectedImage.enabled = true;
|
|
}
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
if (_isQuitting || EventSystem.current?.currentSelectedGameObject == gameObject) return;
|
|
|
|
_selectedImage.color = _originalColor;
|
|
_selectedImage.enabled = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
|