|
|
|
|
@ -61,13 +61,17 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
{ |
|
|
|
|
cur_blob_count = TUIOManager.Instance.touches.Count; |
|
|
|
|
|
|
|
|
|
if(cur_blob_count == 3 && stat == "completed") |
|
|
|
|
if (button.GetComponentInParent<Button>().interactable) |
|
|
|
|
{ |
|
|
|
|
enterVanish(); |
|
|
|
|
} |
|
|
|
|
else if (cur_blob_count > 0 && stat == "wait") |
|
|
|
|
{ |
|
|
|
|
enterGrow(); |
|
|
|
|
|
|
|
|
|
if (cur_blob_count == 0 && stat == "completed") |
|
|
|
|
{ |
|
|
|
|
enterVanish(); |
|
|
|
|
} |
|
|
|
|
else if (cur_blob_count > 0 && stat == "wait") |
|
|
|
|
{ |
|
|
|
|
enterGrow(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
updateVFX(); |
|
|
|
|
@ -99,19 +103,19 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
lerp_val = 1; |
|
|
|
|
stat = "completed"; |
|
|
|
|
StartCoroutine("sendCompleted"); |
|
|
|
|
setButtonInteractable(true); |
|
|
|
|
Invoke("setButtonInteractable", 1); |
|
|
|
|
button.GetComponent<Text>().text = stat; |
|
|
|
|
Debug.Log(stat); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if(stat == "vanishing") |
|
|
|
|
{ |
|
|
|
|
lerp_val -= growingSpeed * 0.4f; |
|
|
|
|
lerp_val -= growingSpeed; |
|
|
|
|
if(lerp_val <= 0) |
|
|
|
|
{ |
|
|
|
|
lerp_val = 0; |
|
|
|
|
stat = "wait"; |
|
|
|
|
setButtonInteractable(true); |
|
|
|
|
Invoke("setButtonInteractable", 1); |
|
|
|
|
button.GetComponent<Text>().text = stat; |
|
|
|
|
Debug.Log(stat); |
|
|
|
|
} |
|
|
|
|
@ -149,7 +153,7 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
public void enterGrow() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
setButtonInteractable(false); |
|
|
|
|
setButtonInteractable(); |
|
|
|
|
stat = "growing"; |
|
|
|
|
vfx.SendEvent("Emit"); |
|
|
|
|
vfx.SetBool("isGrowing", true); |
|
|
|
|
@ -159,7 +163,7 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
|
|
|
|
|
public void enterVanish() |
|
|
|
|
{ |
|
|
|
|
setButtonInteractable(false); |
|
|
|
|
setButtonInteractable(); |
|
|
|
|
stat = "vanishing"; |
|
|
|
|
vfx.SetBool("isGrowing", false); |
|
|
|
|
button.GetComponent<Text>().text = stat; |
|
|
|
|
@ -173,9 +177,10 @@ public class DebugUI : MonoBehaviour |
|
|
|
|
emitter.GetComponent<Renderer>().enabled = isShowed; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setButtonInteractable(bool _stat) |
|
|
|
|
private void setButtonInteractable() |
|
|
|
|
{ |
|
|
|
|
button.GetComponentInParent<Button>().interactable = _stat; |
|
|
|
|
bool _stat = button.GetComponentInParent<Button>().interactable; |
|
|
|
|
button.GetComponentInParent<Button>().interactable = !_stat; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void updateVFX() |
|
|
|
|
|