Advertisement
tcyknhrabirwjyljhp

Untitled

May 11th, 2022
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. // ProjectMage.player.debug.PlayerDebug
  2. // Token: 0x06000620 RID: 1568 RVA: 0x000548AC File Offset: 0x00052AAC
  3. public void Update(float frameTime, float realTime)
  4. {
  5. if (ConfigMgr.debug != 1)
  6. {
  7. return;
  8. }
  9. if (this.p.charIdx < 0)
  10. {
  11. return;
  12. }
  13. Character character = CharMgr.character[this.p.charIdx];
  14. if (GameState.dpsTest)
  15. {
  16. this.debugDPS.Update(frameTime);
  17. }
  18. if (character != null)
  19. {
  20. if (this.active)
  21. {
  22. int num = this.selCategory;
  23. if (this.alpha < 1f)
  24. {
  25. this.alpha += realTime * 10f;
  26. if (this.alpha > 1f)
  27. {
  28. this.alpha = 1f;
  29. }
  30. }
  31. if (this.selX < (float)this.selCategory)
  32. {
  33. this.selX += ((float)this.selCategory - this.selX) * realTime * 10f;
  34. if (this.selX > (float)this.selCategory)
  35. {
  36. this.selX = (float)this.selCategory;
  37. }
  38. }
  39. if (this.selX > (float)this.selCategory)
  40. {
  41. this.selX -= (this.selX - (float)this.selCategory) * realTime * 10f;
  42. if (this.selX < (float)this.selCategory)
  43. {
  44. this.selX = (float)this.selCategory;
  45. }
  46. }
  47. this.category[this.selCategory].Update(realTime);
  48. if (character.keys.keyDebugUp)
  49. {
  50. this.category[this.selCategory].selItem--;
  51. if (this.category[this.selCategory].selItem < 0)
  52. {
  53. this.category[this.selCategory].selItem = this.category[this.selCategory].item.Length - 1;
  54. }
  55. }
  56. if (character.keys.keyDebugDown)
  57. {
  58. this.category[this.selCategory].selItem++;
  59. if (this.category[this.selCategory].selItem > this.category[this.selCategory].item.Length - 1)
  60. {
  61. this.category[this.selCategory].selItem = 0;
  62. }
  63. }
  64. if (character.keys.keyDebugLeft)
  65. {
  66. if (this.selCategory > 0)
  67. {
  68. this.selCategory--;
  69. }
  70. else
  71. {
  72. this.selCategory = this.category.Length - 1;
  73. this.selX = (float)this.selCategory + 1f;
  74. }
  75. }
  76. if (character.keys.keyDebugRight)
  77. {
  78. if (this.selCategory < this.category.Length - 1)
  79. {
  80. this.selCategory++;
  81. }
  82. else
  83. {
  84. this.selCategory = 0;
  85. this.selX = -1f;
  86. }
  87. }
  88. if (num != this.selCategory && this.selCategory == 1)
  89. {
  90. ((DebugSpawnemy)this.category[1]).CreateList();
  91. }
  92. if (character.keys.keyDebugClick)
  93. {
  94. this.category[this.selCategory].Fire(character, this.p);
  95. this.active = false;
  96. }
  97. if (character.keys.keyLeftRun || character.keys.keyRightRun)
  98. {
  99. this.active = false;
  100. return;
  101. }
  102. }
  103. else
  104. {
  105. if (this.alpha > 0f)
  106. {
  107. this.alpha -= realTime * 10f;
  108. if (this.alpha < 0f)
  109. {
  110. this.alpha = 0f;
  111. }
  112. }
  113. if (character.keys.keyDebugLeft || character.keys.keyDebugRight || character.keys.keyDebugUp || character.keys.keyDebugDown)
  114. {
  115. this.active = true;
  116. DebugCategory[] array = this.category;
  117. for (int i = 0; i < array.Length; i++)
  118. {
  119. array[i].Activate(character, this.p);
  120. }
  121. }
  122. }
  123. }
  124. }
  125.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement