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.

75 lines
2.0 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Buguangbtn : MonoBehaviour
{
public GameObject SMY1;
public GameObject SMY2;
public GameObject SMY3;
public int DP;
public int Area;
public void clicksmb()
{
if (DataCenter.Instance.isStart) return;
DataCenter.Instance.isStart = true;
if (DP == 0)
{
if (Area == 0)
{
SMY1.GetComponent<Animator>().SetTrigger("saomiao1");
}
else if (Area == 1)
{
SMY1.GetComponent<Animator>().SetTrigger("saomiao2");
}
else if (Area == 2)
{
SMY1.GetComponent<Animator>().SetTrigger("saomiao3");
}
else if (Area == 3)
{
SMY1.GetComponent<Animator>().SetTrigger("saomiao4");
}
}
else if (DP == 1)
{
if (Area == 0)
{
SMY2.GetComponent<Animator>().SetTrigger("saomiao1");
}
else if (Area == 1)
{
SMY2.GetComponent<Animator>().SetTrigger("saomiao2");
}
else if (Area == 2)
{
SMY2.GetComponent<Animator>().SetTrigger("saomiao3");
}
else if (Area == 3)
{
SMY2.GetComponent<Animator>().SetTrigger("saomiao4");
}
}
else if (DP == 2)
{
if (Area == 0)
{
SMY3.GetComponent<Animator>().SetTrigger("saomiao1");
}
else if (Area == 1)
{
SMY3.GetComponent<Animator>().SetTrigger("saomiao2");
}
else if (Area == 2)
{
SMY3.GetComponent<Animator>().SetTrigger("saomiao3");
}
else if (Area == 3)
{
SMY3.GetComponent<Animator>().SetTrigger("saomiao4");
}
}
}
}