修改细节
This commit is contained in:
1 parent
b93fbd2f2e
commit
929fb0a1a7
15 files changed
+1093
-107
No files matched your search
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
public class RaceButtonGroupScript : MonoBehaviour
|
||||
{
|
||||
private Transform BtnEnter, BtnCancel, BtnWatch;
|
||||
private Transform BtnEnter, BtnCancel, BtnWatch, BtnJoin;
|
||||
public MapCompetition map { get; set; }
|
||||
public Transform parent { get; set; }
|
||||
// Start is called before the first frame update
|
||||
@@ -14,6 +14,7 @@ public class RaceButtonGroupScript : MonoBehaviour
|
||||
BtnEnter = transform.Find("BtnEnter");
|
||||
BtnCancel = transform.Find("BtnCancel");
|
||||
BtnWatch = transform.Find("BtnWatch");
|
||||
BtnJoin = transform.Find("BtnJoin");
|
||||
if (BtnEnter != null)
|
||||
{
|
||||
UIManager.AddEvent(BtnEnter.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => GoEnter());
|
||||
@@ -26,14 +27,21 @@ public class RaceButtonGroupScript : MonoBehaviour
|
||||
{
|
||||
UIManager.AddEvent(BtnWatch.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => GoWatch());
|
||||
}
|
||||
if (BtnJoin != null)
|
||||
{
|
||||
UIManager.AddEvent(BtnJoin.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => GoJoin());
|
||||
}
|
||||
}
|
||||
void GoEnter()
|
||||
void GoJoin()
|
||||
{
|
||||
if (!map.HasJoin)
|
||||
if (!map.HasJoin)
|
||||
{
|
||||
parent.GetComponent<RaceItemScript>().Join();
|
||||
}
|
||||
Debug.Log(map);
|
||||
}
|
||||
void GoEnter()
|
||||
{
|
||||
|
||||
}
|
||||
void GoCancel()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user