1
This commit is contained in:
30
unity/Assets/Script/LotterySystem/UITip.cs
Normal file
30
unity/Assets/Script/LotterySystem/UITip.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
public class UITip : UIWindow
|
||||
{
|
||||
public GameObject tip;
|
||||
public int id;
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
if(collision.CompareTag("Player"))
|
||||
{
|
||||
tip.SetActive(true);
|
||||
if(id==1)//Éý¼¶Npc
|
||||
{
|
||||
UIManager.Instance.Show<UILevelUp>();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnTriggerExit2D(Collider2D collision)
|
||||
{
|
||||
if (collision.CompareTag("Player"))
|
||||
{
|
||||
tip.SetActive(false);
|
||||
}
|
||||
}
|
||||
public int GetNpcId() => id;
|
||||
}
|
||||
Reference in New Issue
Block a user