You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
|
||||
public class ButtonInputUI : MonoBehaviour {
|
||||
|
||||
public Text getButtonDownText;
|
||||
public Text getButtonText;
|
||||
public Text getButtonTimeText;
|
||||
public Text getButtonUpText;
|
||||
|
||||
void Update(){
|
||||
|
||||
|
||||
|
||||
|
||||
if (ETCInput.GetButton("Button")){
|
||||
getButtonText.text="YES";
|
||||
getButtonTimeText.text = ETCInput.GetButtonValue( "Button").ToString();
|
||||
}
|
||||
else{
|
||||
getButtonText.text="";
|
||||
getButtonTimeText.text = "";
|
||||
}
|
||||
|
||||
if (ETCInput.GetButtonDown("Button")){
|
||||
getButtonDownText.text = "YES";
|
||||
StartCoroutine( ClearText(getButtonDownText));
|
||||
}
|
||||
|
||||
if (ETCInput.GetButtonUp("Button")){
|
||||
getButtonUpText.text = "YES";
|
||||
StartCoroutine( ClearText(getButtonUpText));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
IEnumerator ClearText(Text textToCLead){
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
textToCLead.text = "";
|
||||
}
|
||||
|
||||
public void SetSwipeIn(bool value){
|
||||
ETCInput.SetControlSwipeIn( "Button",value);
|
||||
}
|
||||
|
||||
public void SetSwipeOut(bool value){
|
||||
ETCInput.SetControlSwipeOut( "Button",value);
|
||||
|
||||
}
|
||||
|
||||
public void setTimePush( bool value){
|
||||
ETCInput.SetAxisOverTime( "Button",value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd3fd38d33fe8b2448a545e7958200a1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,38 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
|
||||
public class ButtonUIEvent : MonoBehaviour {
|
||||
|
||||
public Text downText;
|
||||
public Text pressText;
|
||||
public Text pressValueText;
|
||||
public Text upText;
|
||||
|
||||
public void Down(){
|
||||
downText.text="YES";
|
||||
StartCoroutine( ClearText(downText));
|
||||
}
|
||||
|
||||
public void Up(){
|
||||
upText.text="YES";
|
||||
StartCoroutine( ClearText(upText));
|
||||
StartCoroutine( ClearText(pressText));
|
||||
StartCoroutine( ClearText(pressValueText));
|
||||
}
|
||||
|
||||
public void Press(){
|
||||
pressText.text="YES";
|
||||
}
|
||||
|
||||
public void PressValue(float value){
|
||||
pressValueText.text = value.ToString();
|
||||
}
|
||||
|
||||
|
||||
IEnumerator ClearText(Text textToCLead){
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
textToCLead.text = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d1e820e2fde81a47a5a206069333583
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user