CreateRoom.cs 869 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System;
  5. using UnityEngine.UI;
  6. public class CreateRoom : OffAnimation
  7. {
  8. [Header("Animator")]
  9. public Animator anim;
  10. [Header("RoomManager")]
  11. public RoomManager roomManager;
  12. public void SetUpCreateRoom()
  13. {
  14. if (this.gameObject.activeSelf)
  15. {
  16. return;
  17. }
  18. this.gameObject.SetActive(true);
  19. anim.SetInteger("Open", 1);
  20. anim.SetInteger("Close", 0);
  21. }
  22. public void CloseCreateRoom()
  23. {
  24. anim.SetInteger("Open", 0);
  25. anim.SetInteger("Close", 1);
  26. }
  27. public void OnClickCreateRoomButton()
  28. {
  29. ContinuousController.instance.isAI = false;
  30. ContinuousController.instance.isRandomMatch = false;
  31. roomManager.SetUpRoom();
  32. CloseCreateRoom();
  33. }
  34. }