DemoSceneCode.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. var EffectNames = ["BloodEffect1","BloodEffect2","BloodEffect3","BloodEffect4","BloodEffect5","DarkEffect1","DarkEffect2","DarkEffect3","DarkEffect4","DarkEffect5","DirtyEffect1","DirtyEffect2","DirtyEffect3","DirtyEffect4","DirtyEffect5","ExplosionEffect1","ExplosionEffect2","ExplosionEffect3","ExplosionEffect4","ExplosionEffect5","FireEffect1","FireEffect2","FireEffect3","FireEffect4","FireEffect5","FireEffect6","FireEffect7","FireEffect8","FireEffect9","FireEffect10","FlameEmissionEffect1","FlameEmissionEffect2","FlameEmissionEffect3","FlameEmissionEffect4","FlameEmissionEffect5","HolyEffect1","HolyEffect2","HolyEffect3","HolyEffect4","HolyEffect5","IceEffect1","IceEffect2","IceEffect3","IceEffect4","IceEffect5","Kunai","Kunai2","Kunai3","Kunai4","Kunai5","Kunai6","Kunai7","Kunai8","Kunai9","Kunai10","LightningEffect1","LightningEffect2","LightningEffect3","LightningEffect4","LightningEffect5","MedicalEffect1","MedicalEffect2","MedicalEffect3","MedicalEffect4","MedicalEffect5","PoisonEffect1","PoisonEffect2","PoisonEffect3","PoisonEffect4","PoisonEffect5","PortalEffect","PortalEffect2","PortalEffect3","PortalEffect4","PortalEffect5","SwampEffect1","SwampEffect2","SwampEffect3","SwampEffect4","SwampEffect5","OtherMagicEffect1","OtherMagicEffect2","OtherMagicEffect3","OtherMagicEffect4","OtherMagicEffect5","OtherMagicEffect6","OtherMagicEffect7","OtherMagicEffect8","OtherMagicEffect9","OtherMagicEffect10","OtherMagicEffect11","OtherMagicEffect12","OtherMagicEffect13","OtherMagicEffect14","OtherMagicEffect15","OtherMagicEffect16","OtherMagicEffect17","OtherMagicEffect18","OtherMagicEffect19","OtherMagicEffect20"];
  2. var Effect2Names = ["BloodEffect5"];
  3. var Effect = new Transform[100];
  4. var Text1 : GUIText;
  5. var i : int = 0;
  6. var a : int = 0;
  7. function Start(){var obj = Instantiate(Effect[i], Vector3(0,5,0),Quaternion.identity);}
  8. function Update () {
  9. Text1.text = i+1 + ":" +EffectNames[i];
  10. if(Input.GetKeyDown(KeyCode.Z))
  11. {
  12. if(i<=0)
  13. i= 99;
  14. else
  15. i--;
  16. for(a = 0 ; a < Effect2Names.length ; a++)
  17. {
  18. if(EffectNames[i] == Effect2Names[a])
  19. {
  20. var obz = Instantiate(Effect[i], Vector3(0,0.01,0),Quaternion.identity);
  21. break;
  22. }
  23. }
  24. if(a++ == Effect2Names.length)
  25. var obz2 = Instantiate(Effect[i], Vector3(0,5,0),Quaternion.identity);
  26. }
  27. if(Input.GetKeyDown(KeyCode.X))
  28. {
  29. if(i< 99)
  30. i++;
  31. else
  32. i=0;
  33. for(a = 0 ; a < Effect2Names.length ; a++)
  34. {
  35. if(EffectNames[i] == Effect2Names[a])
  36. {
  37. var obx = Instantiate(Effect[i], Vector3(0,0.01,0),Quaternion.identity);
  38. break;
  39. }
  40. }
  41. if(a++ == Effect2Names.length)
  42. var obx2 = Instantiate(Effect[i], Vector3(0,5,0),Quaternion.identity);
  43. }
  44. if(Input.GetKeyDown(KeyCode.C))
  45. {
  46. for(a = 0 ; a < Effect2Names.length ; a++)
  47. {
  48. if(EffectNames[i] == Effect2Names[a])
  49. {
  50. var obc = Instantiate(Effect[i], Vector3(0,0.01,0),Quaternion.identity);
  51. break;
  52. }
  53. }
  54. if(a++ == Effect2Names.length)
  55. var obc2 = Instantiate(Effect[i], Vector3(0,5,0),Quaternion.identity);
  56. }
  57. }