You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.0 KiB
71 lines
2.0 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Jiaoshuibtn : MonoBehaviour
|
|
{
|
|
public GameObject JXB1;
|
|
public GameObject JXB2;
|
|
public GameObject JXB3;
|
|
public int DP;
|
|
public int Area;
|
|
|
|
public void clickbtn() {
|
|
if (DataCenter.Instance.isStart) return;
|
|
DataCenter.Instance.isStart = true;
|
|
if (DP == 0)
|
|
{
|
|
if (Area == 0) {
|
|
JXB1.GetComponent<Animator>().SetTrigger("jiaoshui4");
|
|
} else if (Area == 1) {
|
|
JXB1.GetComponent<Animator>().SetTrigger("jiaoshui2");
|
|
}
|
|
else if (Area == 2)
|
|
{
|
|
JXB1.GetComponent<Animator>().SetTrigger("jiaoshui1");
|
|
}
|
|
else if (Area == 3)
|
|
{
|
|
JXB1.GetComponent<Animator>().SetTrigger("jiaoshui3");
|
|
}
|
|
}
|
|
else if (DP == 1) {
|
|
if (Area == 0)
|
|
{
|
|
JXB2.GetComponent<Animator>().SetTrigger("jiaoshui4");
|
|
}
|
|
else if (Area == 1)
|
|
{
|
|
JXB2.GetComponent<Animator>().SetTrigger("jiaoshui2");
|
|
}
|
|
else if (Area == 2)
|
|
{
|
|
JXB2.GetComponent<Animator>().SetTrigger("jiaoshui1");
|
|
}
|
|
else if (Area == 3)
|
|
{
|
|
JXB2.GetComponent<Animator>().Play("jiaoshui3");
|
|
}
|
|
} else if (DP==2) {
|
|
if (Area == 0)
|
|
{
|
|
JXB3.GetComponent<Animator>().SetTrigger("jiaoshui4");
|
|
}
|
|
else if (Area == 1)
|
|
{
|
|
JXB3.GetComponent<Animator>().SetTrigger("jiaoshui2");
|
|
}
|
|
else if (Area == 2)
|
|
{
|
|
JXB3.GetComponent<Animator>().SetTrigger("jiaoshui1");
|
|
}
|
|
else if (Area == 3)
|
|
{
|
|
JXB3.GetComponent<Animator>().SetTrigger("jiaoshui3");
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|