英理玩法
This commit is contained in:
@@ -16,14 +16,14 @@ namespace AibisDream
|
||||
private bool _isPointerInside;
|
||||
private bool _isPointerDown;
|
||||
private bool _hasSelection;
|
||||
private bool _isInteractable;
|
||||
// private bool _isInteractable;
|
||||
|
||||
private SelectionType CurrentSelectionType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_isInteractable)
|
||||
return SelectionType.Disabled;
|
||||
// if (!_isInteractable)
|
||||
// return SelectionType.Disabled;
|
||||
if (_isPointerDown)
|
||||
return SelectionType.Pressed;
|
||||
if (_isPointerInside)
|
||||
@@ -32,15 +32,15 @@ namespace AibisDream
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInteractive
|
||||
{
|
||||
get => _isInteractable;
|
||||
set
|
||||
{
|
||||
_isInteractable = value;
|
||||
DoStateTransition(CurrentSelectionType);
|
||||
}
|
||||
}
|
||||
// public bool IsInteractive
|
||||
// {
|
||||
// get => _isInteractable;
|
||||
// set
|
||||
// {
|
||||
// _isInteractable = value;
|
||||
// DoStateTransition(CurrentSelectionType);
|
||||
// }
|
||||
// }
|
||||
|
||||
public void OnPointerDown(PointerEventData eventData)
|
||||
{
|
||||
@@ -76,8 +76,8 @@ namespace AibisDream
|
||||
|
||||
private void EvaluateAndTransitionToSelectionType()
|
||||
{
|
||||
if (!_isInteractable)
|
||||
return;
|
||||
// if (!_isInteractable)
|
||||
// return;
|
||||
|
||||
DoStateTransition(CurrentSelectionType);
|
||||
}
|
||||
@@ -97,7 +97,8 @@ namespace AibisDream
|
||||
_ => Color.black
|
||||
};
|
||||
|
||||
spriteRenderer.DOColor(tintColor, colorBlock.fadeDuration).SetUpdate(true);
|
||||
// spriteRenderer.DOColor(tintColor, colorBlock.fadeDuration).SetUpdate(true);
|
||||
spriteRenderer.color = tintColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user