void OnClickHitArea(UguiNovelTextHitArea hitGroup, Action <string> OnClicked) { switch (hitGroup.HitEventType) { case CharData.HitEventType.Sound: OnClicked(hitGroup.Arg); break; } }
//クリック public void OnPointerClick(PointerEventData eventData) { UguiNovelTextHitArea group = HitTest(eventData); if (group != null) { OnClick.Invoke(group); } }
public void OnPointerClick(PointerEventData eventData) { UguiNovelTextHitArea area = this.HitTest(eventData); if (area != null) { this.OnClick.Invoke(area); } }
//当たり判定のチェック public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) { UguiNovelTextHitArea target = HitTest(sp, eventCamera); if (isEntered) { ChangeCurrentTarget(target); } return(target != null); }
private void ChangeCurrentTarget(UguiNovelTextHitArea target) { if (this.currentTarget != target) { if (this.currentTarget != null) { this.currentTarget.ResetEffectColor(); } this.currentTarget = target; if (this.currentTarget != null) { this.currentTarget.ChangeEffectColor(this.hoverColor); } } }
void ChangeCurrentTarget(UguiNovelTextHitArea target) { if (currentTarget != target) { if (currentTarget != null) { currentTarget.ResetEffectColor(); } currentTarget = target; if (currentTarget != null) { currentTarget.ChangeEffectColor(hoverColor); } } }
public void OnClickTips(UguiNovelTextHitArea hit) { Debug.Log(hit.Arg); }