Roxaq

ConjurationTableEvents

Nov 10th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class ConjurationTableEvents : MonoBehaviour
  5. {
  6. public delegate void CombinationAction();
  7. public static event CombinationAction OnCombine;
  8.  
  9. public GameObject sCardEffect;
  10.  
  11. void Awake(){
  12.  
  13. }
  14.  
  15. public void CombineButton()
  16. {
  17. if (OnCombine != null)
  18. {
  19. OnCombine();
  20. sCardEffect.SetActive (true);
  21. StartCoroutine(RestartSpawnCardEffect());
  22. }
  23. }
  24.  
  25. IEnumerator RestartSpawnCardEffect()
  26. {
  27. yield return new WaitForSeconds(2);
  28. sCardEffect.SetActive (false);
  29. }
  30. }
Add Comment
Please, Sign In to add comment