Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.22 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class dziki : MonoBehaviour
  6. {
  7. public static int dupa;
  8.  
  9. public static int dzikipok;
  10. public static float poziom;
  11. public static string numer;
  12. public static string nazwa;
  13. public static float HP;
  14. public static float MaxHpValue;
  15. public static float atak;
  16. public static float obrona;
  17. public static float spid;
  18. public static float specatak;
  19. public static float specobrona;
  20. public static string typ1;
  21. public static string typ2;
  22. public static float HP_mnoznik;
  23. public static float atak_mnoznik;
  24. public static float obrona_mnoznik;
  25. public static float spid_mnoznik;
  26. public static float specatak_mnoznik;
  27. public static float specobrona_mnoznik;
  28. public static string atak1_nazwa;
  29. public static string atak1_numer;
  30. public static string atak1_type;
  31. public static string atak1_pp_current;
  32. public static string atak1_pp_max;
  33. public static string atak1_power;
  34. public static string atak1_accuracy;
  35. public static string atak1_is_special;
  36. public static string atak2_nazwa;
  37. public static string atak2_numer;
  38. public static string atak2_type;
  39. public static string atak2_pp_current;
  40. public static string atak2_pp_max;
  41. public static string atak2_power;
  42. public static string atak2_accuracy;
  43. public static string atak2_is_special;
  44. public static string atak3_numer;
  45. public static string atak3_nazwa;
  46. public static string atak3_type;
  47. public static string atak3_pp_current;
  48. public static string atak3_pp_max;
  49. public static string atak3_power;
  50. public static string atak3_accuracy;
  51. public static string atak3_is_special;
  52. public static string atak4_numer;
  53. public static string atak4_nazwa;
  54. public static string atak4_type;
  55. public static string atak4_pp_current;
  56. public static string atak4_pp_max;
  57. public static string atak4_power;
  58. public static string atak4_accuracy;
  59. public static string atak4_is_special;
  60. public static string atak_chosen;
  61. public static string atak_type_chosen;
  62. public static string atak_pp_chosen;
  63. public static string atak_power_chosen;
  64. public static string atak_accuracy_chosen;
  65. public static string status_poison;
  66. public static string status_burn;
  67. public static string status_sleep;
  68. public static string status_paralyze;
  69. public static string status_freeze;
  70. public static int atak1_przyb;
  71. public static int atak2_przyb;
  72. public static int atak3_przyb;
  73. public static int atak4_przyb;
  74. // Use this for initialization
  75. void Start()
  76. {
  77.  
  78. TextAsset pokemon = Resources.Load<TextAsset>("pokemon_1");
  79.  
  80. string[] data = pokemon.text.Split(new char[] { '\n' });
  81.  
  82. for (int i = (cube.pokenumber * 2) - 1; i <= (cube.pokenumber * 2) - 1; i++)
  83. {
  84. string[] row = data[i].Split(new char[] { ';' });
  85.  
  86. Pokemon q = new Pokemon();
  87.  
  88. q.poziom = row[0];
  89. q.numer = row[1];
  90. q.nazwa = row[2];
  91. q.HP = row[3];
  92. q.HP_mnoznik = row[4];
  93. q.atak = row[5];
  94. q.atak_mnoznik = row[6];
  95. q.obrona = row[7];
  96. q.obrona_mnoznik = row[8];
  97. q.spid = row[9];
  98. q.spid_mnoznik = row[10];
  99. q.specatak = row[11];
  100. q.specatak_mnoznik = row[12];
  101. q.specobrona = row[13];
  102. q.specobrona_mnoznik = row[14];
  103. q.typ1 = row[15];
  104. q.typ2 = row[16];
  105. dupa = int.Parse(q.numer);
  106. poziom = float.Parse(q.poziom) * cube.pokelevel;
  107. numer = q.numer;
  108. nazwa = q.nazwa;
  109. HP = Mathf.Round(float.Parse(q.HP) + cube.pokelevel * float.Parse(q.HP_mnoznik));
  110. atak = Mathf.Round(float.Parse(q.atak) + cube.pokelevel * float.Parse(q.atak_mnoznik));
  111. obrona = Mathf.Round(float.Parse(q.obrona) + cube.pokelevel * float.Parse(q.obrona_mnoznik));
  112. spid = Mathf.Round(float.Parse(q.spid) + cube.pokelevel * float.Parse(q.spid_mnoznik));
  113. specatak = Mathf.Round(float.Parse(q.specatak) + cube.pokelevel * float.Parse(q.specatak_mnoznik));
  114. specobrona = Mathf.Round(float.Parse(q.specobrona) + cube.pokelevel * float.Parse(q.specobrona_mnoznik));
  115. typ1 = q.typ1;
  116. typ2 = q.typ2;
  117.  
  118.  
  119.  
  120.  
  121.  
  122. TextAsset pokemon2 = Resources.Load<TextAsset>("ataki");
  123.  
  124. string[] data2 = pokemon2.text.Split(new char[] { '\n' });
  125.  
  126. for (int i2 = cube.pokelevel; i2 <= cube.pokelevel; i2++)
  127. {
  128. string[] row2 = data2[i2].Split(new char[] { ';' });
  129.  
  130. atakingenemy w = new atakingenemy();
  131.  
  132. w.atak = row2[dupa];
  133. print(w.atak);
  134. string[] cell = w.atak.Split(new char[] { ',' });
  135.  
  136.  
  137. atak1_numer = cell[0];
  138. print(atak1_numer);
  139. atak2_numer = cell[1];
  140. print(atak2_numer);
  141.  
  142. atak3_numer = cell[2];
  143. print(atak3_numer);
  144.  
  145. atak4_numer = cell[3];
  146. print(atak4_numer);
  147.  
  148. }
  149.  
  150. TextAsset pokemon3 = Resources.Load<TextAsset>("moveset");
  151.  
  152. atak1_przyb = int.Parse(atak1_numer);
  153.  
  154. string[] data3 = pokemon3.text.Split(new char[] { '\n' });
  155.  
  156.  
  157.  
  158. atak1_przyb = int.Parse(atak1_numer);
  159. for (int i3 = atak1_przyb - 1; i3 <= atak1_przyb - 1; i3++)
  160. {
  161. string[] row3 = data3[i3].Split(new char[] { ';' });
  162.  
  163. moveset e = new moveset();
  164.  
  165. atak1_nazwa = row3[0];
  166. print(atak1_nazwa);
  167. atak1_type = row3[1];
  168. atak1_pp_max = row3[2];
  169. atak1_pp_current = atak1_pp_max;
  170. atak1_power = row3[3];
  171. atak1_accuracy = row3[4];
  172. atak1_is_special = row3[5];
  173. }
  174. atak2_przyb = int.Parse(atak2_numer);
  175. if (atak2_przyb != 0)
  176. {
  177.  
  178. for (int i4 = atak2_przyb - 1; i4 <= atak2_przyb - 1; i4++)
  179. {
  180. string[] row4 = data3[i4].Split(new char[] { ';' });
  181.  
  182. moveset e = new moveset();
  183.  
  184. atak2_nazwa = row4[0];
  185. atak2_type = row4[1];
  186. atak2_pp_max = row4[2];
  187. atak2_pp_current = atak2_pp_max;
  188. atak2_power = row4[3];
  189. atak2_accuracy = row4[4];
  190. atak2_is_special = row4[5];
  191. }
  192. }
  193. atak3_przyb = int.Parse(atak3_numer);
  194. if (atak3_przyb != 0)
  195. {
  196.  
  197. for (int i5 = atak3_przyb - 1; i5 <= atak3_przyb - 1; i5++)
  198. {
  199. string[] row5 = data3[i5].Split(new char[] { ';' });
  200.  
  201. moveset e = new moveset();
  202.  
  203. atak3_nazwa = row5[0];
  204. atak3_type = row5[1];
  205. atak3_pp_max = row5[2];
  206. atak3_pp_current = user_pok1.atak3_pp_max;
  207. atak3_power = row5[3];
  208. atak3_accuracy = row5[4];
  209. atak3_is_special = row5[5];
  210. }
  211. }
  212. atak4_przyb = int.Parse(atak4_numer);
  213. print("atak 3 przyb to: " + atak3_przyb);
  214. if (atak3_przyb != 0)
  215. {
  216.  
  217. for (int i6 = atak4_przyb - 1; i6 <= atak4_przyb - 1; i6++)
  218. {
  219. string[] row6 = data3[i6].Split(new char[] { ';' });
  220.  
  221. moveset e = new moveset();
  222.  
  223. atak4_nazwa = row6[0];
  224. atak4_type = row6[1];
  225. atak4_pp_max = row6[2];
  226. atak4_pp_current = atak4_pp_max;
  227. atak4_power = row6[3];
  228. atak4_accuracy = row6[4];
  229. atak4_is_special = row6[5];
  230. }
  231. }
  232.  
  233.  
  234.  
  235. enemy.przypisanie();
  236.  
  237.  
  238. }
  239. }
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement