Guest User

Untitled

a guest
Oct 15th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. local mStages = STATSMAN:GetStagesPlayed();
  2. local i = 0;
  3. local grades = {
  4. Grade_Tier01 = 0;
  5. Grade_Tier02 = 0;
  6. Grade_Tier03 = 1;
  7. Grade_Tier04 = 2;
  8. Grade_Tier05 = 3;
  9. Grade_Tier06 = 4;
  10. Grade_Tier07 = 5;
  11. Grade_Failed = 6;
  12. Grade_None = 7;
  13. };
  14.  
  15. local t = Def.ActorFrame {};
  16.  
  17. --[[ PLAYER LABELS--]]
  18. for pn in ivalues(PlayerNumber) do
  19. t[#t+1] = LoadActor( THEME:GetPathG("ScreenEvaluation", "PlayerLabel " .. PlayerNumberToString(pn)) ) .. {
  20. InitCommand=cmd(player,pn);
  21. BeginCommand=function(self)
  22. local pX = 0;
  23. if pn == PLAYER_1 then
  24. pX = -233;
  25. else
  26. pX = 233;
  27. end
  28.  
  29. self:addx( pX );
  30. self:addy( -80 );
  31. end;
  32. OnCommand=cmd(zoomy,0;diffusealpha,0;sleep,1.969;linear,0.100;zoomy,1;diffusealpha,1);
  33. OffCommand=cmd(sleep,0.000;linear,0.133;zoomy,0;diffusealpha,0);
  34. };
  35. end
  36.  
  37. for pn in ivalues(PlayerNumber) do
  38. for i = 1, mStages do
  39.  
  40. local sStats = STATSMAN:GetPlayedStageStats( i );
  41. local pStageStats = sStats:GetPlayerStageStats( pn );
  42.  
  43. local function GetColor()
  44. local pColor = "1,1,1,0";
  45. if pStageStats:FullComboOfScore('TapNoteScore_W1') then
  46. pColor = "#ffffff";
  47. elseif pStageStats:FullComboOfScore('TapNoteScore_W2') then
  48. pColor = "#ffff00";
  49. elseif pStageStats:FullCombo() then
  50. pColor = "#33cc33";
  51. else
  52. pColor = "1,1,1,0";
  53. end
  54. return pColor
  55. end;
  56.  
  57. --[[ SCORE DISPLAYS --]]
  58. t[#t+1] = Def.ActorFrame {
  59. InitCommand=cmd(player,pn);
  60.  
  61. LoadFont( "ScreenWithMenuElements StageDisplay" ) .. {
  62. InitCommand=cmd(zoom,0.5);
  63. BeginCommand=function(self)
  64. local pStage = sStats:GetStage();
  65. local pX = 0;
  66. if pn == PLAYER_1 then
  67. pX = -280;
  68. self:horizalign( left );
  69. else
  70. pX = 280;
  71. self:horizalign( right );
  72. end
  73. self:maxwidth( 200 );
  74. self:addx( pX );
  75. self:addy( ( (mStages - i) * 50) - 62 );
  76. self:diffuse( color( "ffffff" ) );
  77. self:settext( StageToLocalizedString(pStage) .. " STAGE" );
  78.  
  79. end;
  80. OnCommand=cmd();
  81. };
  82. LoadFont( "ScreenEvaluation ScoreNumber" ) .. {
  83. InitCommand=cmd(zoom,1.033;diffuse,color('#d9b600');diffusealpha,0);
  84. BeginCommand=function(self)
  85. local pScore = pStageStats:GetScore();
  86.  
  87. local score_length = string.len(tostring(pScore));
  88. local target_length = 7;
  89. local text = string.rep('0', clamp(target_length - score_length, 0, 7));
  90. local pX = 0;
  91. if pn == PLAYER_1 then
  92. pX = -230;
  93. else
  94. pX = 230;
  95. end
  96. self:addx( pX );
  97. self:addy( ( (mStages - i) * 50) - 42 );
  98. self:settext(comma_value(text .. pScore));
  99. end;
  100. OnCommand=function(self)
  101. local pX = 0;
  102.  
  103. if pn == PLAYER_1 then
  104. pX = SCREEN_WIDTH/2;
  105. else
  106. pX = -(SCREEN_WIDTH/2);
  107. end
  108.  
  109. self:sleep( 1.952 );
  110. self:diffusealpha( 1 );
  111. self:addx( (-1) * ( pX ) );
  112. self:linear( 0.2 );
  113. self:addx( pX );
  114. end;
  115. };
  116. --[[ GRADE RING --]]
  117. LoadActor("ring") .. {
  118. InitCommand=cmd();
  119. BeginCommand=function(self)
  120.  
  121. if pn == PLAYER_1 then
  122. pX = -80;
  123. else
  124. pX = 140;
  125. end
  126.  
  127. self:addx( pX );
  128. self:addy( ( (mStages - i) * 50) - 60 );
  129. self:diffuse( color(GetColor()) );
  130.  
  131. if pStageStats:FullCombo() then
  132. self:visible( true );
  133. else
  134. self:visible( false );
  135. end
  136. end;
  137. OnCommand=cmd(zoom,0;diffusealpha,0;sleep,0.000;sleep,0.316;linear,0.266;diffusealpha,1;zoom,0.5;spin;effectmagnitude,0,0,170);
  138. OffCommand=cmd(zoom,0.5;sleep,0.0000;sleep,0.083;linear,0.133;zoom,0;diffusealpha,0;rotationz,180);
  139. };
  140.  
  141. --[[ GRADE LINES --]]
  142. LoadActor("lines") .. {
  143. InitCommand=cmd();
  144. BeginCommand=function(self)
  145.  
  146. if pn == PLAYER_1 then
  147. pX = -80;
  148. else
  149. pX = 140;
  150. end
  151.  
  152. self:addx( pX );
  153. self:addy( ( (mStages - i) * 50) - 60 );
  154. self:diffuse( color(GetColor()) );
  155.  
  156. if pStageStats:FullCombo() then
  157. self:visible( true );
  158. else
  159. self:visible( false );
  160. end
  161.  
  162. end;
  163. OnCommand=cmd(zoom,0;diffusealpha,0;sleep,0.000;sleep,0.316;linear,0.266;diffusealpha,1;zoom,0.5;spin;effectmagnitude,0,0,-170);
  164. OffCommand=cmd(zoomy,0.5;sleep,0.0000;sleep,0.083;linear,0.133;zoom,0;diffusealpha,0;rotationz,-180);
  165. };
  166.  
  167. --[[ INDIVIDUAL STAGE GRADES --]]
  168. LoadActor(THEME:GetPathG("","MusicWheelItem grades/grades")) .. {
  169. InitCommand=cmd(pause);
  170. BeginCommand=function(self)
  171. local pGrade = pStageStats:GetGrade();
  172. local state = grades[pGrade] or grades['Grade_None'];
  173. local pX = 0;
  174. if pn == PLAYER_1 then
  175. pX = -103;
  176. else
  177. pX = 102;
  178. end
  179.  
  180. if state then
  181. self:visible( true );
  182. self:setstate(state);
  183. else
  184. self:visible( false );
  185. end
  186.  
  187. self:addx( pX );
  188. self:addy( ( (mStages - i) * 50) - 50 );
  189. end;
  190. OnCommand=cmd(zoom,0.5);
  191. };
  192. LoadActor( "difficulty tab" ) .. {
  193. InitCommand=cmd();
  194. BeginCommand=function(self)
  195. local pSteps = pStageStats:GetPlayedSteps();
  196. --[[local pDifficulty = pSteps:GetDifficulty();--]]
  197. local pX = 0;
  198.  
  199. if pn == PLAYER_1 then
  200. pX = -144;
  201. else
  202. pX = 144;
  203. end
  204.  
  205. self:addx( pX );
  206. self:addy( ( (mStages - i) * 50) - 50 );
  207. --[[self:diffuse( CustomDifficultyToColor(pDifficulty) );--]]
  208. end;
  209. OnCommand=cmd();
  210. };
  211.  
  212. LoadActor( "frame" ) .. {
  213. InitCommand=cmd();
  214. BeginCommand=function(self)
  215. self:addy( ( (mStages - i) * 50) - 54 );
  216. end;
  217. OnCommand=cmd();
  218. };
  219.  
  220. Def.Sprite {
  221. InitCommand=cmd();
  222. BeginCommand=function(self)
  223. self:addy( ( (mStages - i) * 50) - 50 );
  224. self:LoadBanner( STATSMAN:GetPlayedSongs() );
  225. end;
  226. OnCommand=cmd();
  227. };
  228.  
  229. };
  230. end
  231. end
  232.  
  233. return t
Add Comment
Please, Sign In to add comment