StopYourEffect.cs 504 B

123456789101112131415161718192021222324
  1. using System;
  2. using UnityEngine;
  3. using Xft;
  4. public class StopYourEffect : MonoBehaviour
  5. {
  6. private void OnGUI()
  7. {
  8. if (GUI.Button(new Rect(0f, 0f, 350f, 30f), "Reset"))
  9. {
  10. this.SampleLoop.Active();
  11. }
  12. if (GUI.Button(new Rect(0f, 30f, 350f, 30f), "stop effect immediately"))
  13. {
  14. this.SampleLoop.DeActive();
  15. }
  16. if (GUI.Button(new Rect(0f, 60f, 350f, 30f), "stop effect softly"))
  17. {
  18. this.SampleLoop.StopSmoothly(1f);
  19. }
  20. }
  21. public XffectComponent SampleLoop;
  22. }