|
|
|
|
@ -8,7 +8,7 @@ using TUIO; |
|
|
|
|
|
|
|
|
|
public class DebugUI : MonoBehaviour |
|
|
|
|
{ |
|
|
|
|
public bool debugMode = true; |
|
|
|
|
|
|
|
|
|
public GameObject canvas; |
|
|
|
|
public VisualEffect vfx; |
|
|
|
|
public GameObject baseEmitter; |
|
|
|
|
@ -17,6 +17,9 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
public GameObject button; |
|
|
|
|
public string stat = "wait"; |
|
|
|
|
|
|
|
|
|
[Config] |
|
|
|
|
public bool debugMode = false; |
|
|
|
|
|
|
|
|
|
[Config] |
|
|
|
|
[Range(0f, 5f)] |
|
|
|
|
public float Emitter_x = 2.5f; |
|
|
|
|
@ -42,15 +45,31 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
{ |
|
|
|
|
QualitySettings.vSyncCount = 0; |
|
|
|
|
stat = "wait"; |
|
|
|
|
canvas.SetActive(debugMode); |
|
|
|
|
//canvas.GetComponent<Canvas>().ena(debugMode); |
|
|
|
|
button.GetComponent<Text>().text = stat; |
|
|
|
|
lerp_val = 0; |
|
|
|
|
cur_blob_count = 0; |
|
|
|
|
setObjectVisible(debugMode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Update is called once per frame |
|
|
|
|
void Update() |
|
|
|
|
{ |
|
|
|
|
if (Input.GetKeyDown(KeyCode.F1)) |
|
|
|
|
{ |
|
|
|
|
debugMode = !debugMode; |
|
|
|
|
//canvas.GetComponent<Canvas>().enabled = debugMode; |
|
|
|
|
if (debugMode) |
|
|
|
|
{ |
|
|
|
|
showObject = true; |
|
|
|
|
setObjectVisible(showObject); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
showObject = false; |
|
|
|
|
setObjectVisible(showObject); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
cur_blob_count = TUIOManager.Instance.touches.Count; |
|
|
|
|
|
|
|
|
|
if (button.GetComponentInParent<Button>().interactable) |
|
|
|
|
@ -66,26 +85,13 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.F1)) |
|
|
|
|
{ |
|
|
|
|
debugMode = !debugMode; |
|
|
|
|
canvas.GetComponent<Canvas>().enabled = debugMode; |
|
|
|
|
if (debugMode) |
|
|
|
|
{ |
|
|
|
|
showObject = true; |
|
|
|
|
setObjectVisible(showObject); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
showObject = false; |
|
|
|
|
setObjectVisible(showObject); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
else if (debugMode && Input.GetKeyDown(KeyCode.F2)) |
|
|
|
|
{ |
|
|
|
|
showObject = !showObject; |
|
|
|
|
setObjectVisible(showObject); |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
if (stat == "growing") |
|
|
|
|
{ |
|
|
|
|
@ -167,6 +173,7 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
baseEmitter.GetComponent<Renderer>().enabled = isShowed; |
|
|
|
|
target.GetComponent<Renderer>().enabled = isShowed; |
|
|
|
|
emitter.GetComponent<Renderer>().enabled = isShowed; |
|
|
|
|
button.GetComponentInParent<Button>().image.enabled = isShowed; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void switchButtonStat() |
|
|
|
|
|