mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 04:37:11 +08:00
(client) feat:健康给予,路径优化,结算界面,商店界面 (#60)
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/60
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Prefab
|
||||
public class HoverButtonPrefab : MonoBehaviour
|
||||
{
|
||||
public TMP_Text text;
|
||||
|
||||
public Button button;
|
||||
// public CircleCollider2D circleCollider;
|
||||
|
||||
@@ -20,15 +21,6 @@ namespace Prefab
|
||||
// circleCollider.radius=startRadius;
|
||||
}
|
||||
|
||||
public void OnMouseOver()
|
||||
{
|
||||
var dir = (Input.mousePosition - transform.position).magnitude;
|
||||
|
||||
var color = button.image.color;
|
||||
color.a = Mathf.Min((startRadius - dir) / (startRadius - endRadius), 1);
|
||||
button.image.color = color;
|
||||
}
|
||||
|
||||
public void OnMouseEnter()
|
||||
{
|
||||
button.gameObject.SetActive(true);
|
||||
@@ -38,5 +30,14 @@ namespace Prefab
|
||||
{
|
||||
button.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void OnMouseOver()
|
||||
{
|
||||
var dir = (Input.mousePosition - transform.position).magnitude;
|
||||
|
||||
var color = button.image.color;
|
||||
color.a = Mathf.Min((startRadius - dir) / (startRadius - endRadius), 1);
|
||||
button.image.color = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user