1
This commit is contained in:
@@ -8,14 +8,14 @@ public class TouchPlayAnimatior : MonoBehaviour
|
||||
public GrabItem grabItem;
|
||||
Animator animator;
|
||||
AudioSource audioSource;
|
||||
//clips<70><73><EFBFBD><EFBFBD>
|
||||
//clips<70><73><EFBFBD><EFBFBD>
|
||||
public AudioClip[] audioClips;
|
||||
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD>
|
||||
bool isRun = false;
|
||||
float waitTime = 4f;
|
||||
float runTime = 0;
|
||||
|
||||
float showGrabItem = 1.5f; //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ͭ<EFBFBD>ߵ<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
float showGrabItem = 1.5f; //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ͭ<EFBFBD>ߵ<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@@ -40,7 +40,7 @@ public class TouchPlayAnimatior : MonoBehaviour
|
||||
// grabItem.gameObject.SetActive(true);
|
||||
this.gameObject.SetActive(false);
|
||||
}
|
||||
if (runTime >= showGrabItem) //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͭ<EFBFBD><EFBFBD>
|
||||
if (runTime >= showGrabItem) //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ͭ<EFBFBD><CDAD>
|
||||
{
|
||||
if (grabItem != null && grabItem.gameObject.activeSelf == false)
|
||||
{
|
||||
@@ -64,14 +64,24 @@ public class TouchPlayAnimatior : MonoBehaviour
|
||||
PlayAudioByIndex(0);
|
||||
}
|
||||
}
|
||||
[Header("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
|
||||
[SerializeField] private Animator childAnimator; // ֱ<><D6B1><EFBFBD>϶<EFBFBD><CFB6><EFBFBD><EFBFBD><EFBFBD>
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.gameObject.name == "PalmBox_L" || other.gameObject.name == "PalmBox_R")
|
||||
{
|
||||
|
||||
SceneMgr.Instance.isTrigger = false;
|
||||
|
||||
}
|
||||
}
|
||||
[Header("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
|
||||
[SerializeField] private Object childAnimator; // ֱ<><D6B1><EFBFBD>϶<EFBFBD><CFB6><EFBFBD>
|
||||
|
||||
public void SetTriggerParameter(string parameterName)
|
||||
{
|
||||
if (childAnimator != null)
|
||||
{
|
||||
childAnimator.SetTrigger(parameterName);
|
||||
Destroy(childAnimator);
|
||||
childAnimator = null;
|
||||
}
|
||||
}
|
||||
void ShowFont()
|
||||
@@ -91,7 +101,7 @@ public class TouchPlayAnimatior : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("<22><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>");
|
||||
Debug.LogWarning("<22><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user