Cancel.cs 859 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Cancel : MonoBehaviour
  5. {
  6. public GameObject lineParent;
  7. public GameObject imagepaint;
  8. public void ClickCancelBtn()
  9. {
  10. PaintLine.canUse = false;
  11. if (imagepaint.transform.childCount>0)
  12. {
  13. for (int i = 0; i < imagepaint.transform.childCount; i++)
  14. {
  15. Destroy(imagepaint.transform.GetChild(i).gameObject);
  16. }
  17. }
  18. if (lineParent.transform.childCount > 0)
  19. {
  20. for (int i = 0; i < lineParent.transform.childCount; i++)
  21. {
  22. Destroy(lineParent.transform.GetChild(i).gameObject);
  23. }
  24. }
  25. if (RoomMainForms.Instance)
  26. {
  27. RoomMainForms.Instance.JieTuWancheng();
  28. }
  29. }
  30. }