demo.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using System;
  2. using UnityEngine;
  3. using Xft;
  4. public class demo : MonoBehaviour
  5. {
  6. private void Start()
  7. {
  8. this.explode_energy.Initialize();
  9. this.ice_impact.Initialize();
  10. this.suckblood.Initialize();
  11. this.firestorm.Initialize();
  12. this.phantomsword.Initialize();
  13. this.cyclonestorm.Initialize();
  14. this.radial_energy.Initialize();
  15. this.lightning_storm.Initialize();
  16. this.glow_per_obj.Initialize();
  17. }
  18. private void Reset()
  19. {
  20. this.explode_energy.DeActive();
  21. this.ice_impact.DeActive();
  22. this.suckblood.DeActive();
  23. this.firestorm.DeActive();
  24. this.phantomsword.DeActive();
  25. this.cyclonestorm.DeActive();
  26. this.radial_energy.DeActive();
  27. this.lightning_storm.DeActive();
  28. this.glow_per_obj.DeActive();
  29. }
  30. private void OnGUI()
  31. {
  32. GUI.Label(new Rect(60f, 0f, 500f, 30f), "Requires unity pro to get the best result.");
  33. if (GUI.Button(new Rect(0f, 0f, 50f, 30f), "1"))
  34. {
  35. this.explode_energy.Active();
  36. }
  37. if (GUI.Button(new Rect(0f, 30f, 50f, 30f), "2"))
  38. {
  39. this.ice_impact.Active();
  40. }
  41. if (GUI.Button(new Rect(0f, 60f, 50f, 30f), "3"))
  42. {
  43. this.suckblood.Active();
  44. }
  45. if (GUI.Button(new Rect(0f, 90f, 50f, 30f), "4"))
  46. {
  47. this.firestorm.Active();
  48. }
  49. if (GUI.Button(new Rect(0f, 120f, 50f, 30f), "5"))
  50. {
  51. this.phantomsword.Active();
  52. }
  53. if (GUI.Button(new Rect(0f, 150f, 50f, 30f), "6"))
  54. {
  55. this.cyclonestorm.Active();
  56. }
  57. if (GUI.Button(new Rect(0f, 180f, 50f, 30f), "7"))
  58. {
  59. this.radial_energy.Active();
  60. }
  61. if (GUI.Button(new Rect(0f, 210f, 50f, 30f), "8"))
  62. {
  63. this.lightning_storm.Active();
  64. }
  65. if (GUI.Button(new Rect(0f, 240f, 50f, 30f), "9"))
  66. {
  67. this.glow_per_obj.Active();
  68. }
  69. if (GUI.Button(new Rect(0f, 270f, 50f, 30f), "Reset"))
  70. {
  71. this.Reset();
  72. }
  73. }
  74. public XffectComponent explode_energy;
  75. public XffectComponent ice_impact;
  76. public CompositeXffect suckblood;
  77. public CompositeXffect firestorm;
  78. public XffectComponent phantomsword;
  79. public CompositeXffect cyclonestorm;
  80. public XffectComponent radial_energy;
  81. public CompositeXffect lightning_storm;
  82. public XffectComponent glow_per_obj;
  83. }