1
0
mirror of synced 2024-11-28 01:10:53 +01:00

Luaでクリア演出をカスタマイズ可能に (#350)

This commit is contained in:
Takkkom 2023-01-22 20:16:22 +09:00 committed by GitHub
parent b745e0cbe9
commit 1207812947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 471 additions and 27 deletions

View File

@ -43,7 +43,7 @@ namespace TJAPlayer3
const string TAIKO = @"6_Taiko\";
const string GAUGE = @"7_Gauge\";
public const string FOOTER = @"8_Footer\";
const string END = @"9_End\";
public const string END = @"9_End\";
const string EFFECTS = @"10_Effects\";
const string BALLOON = @"11_Balloon\";
const string LANE = @"12_Lane\";

View File

@ -31,11 +31,14 @@ namespace TJAPlayer3
bSongsPlayed = false;
this.ct進行メイン = new CCounter(0, 300, 22, TJAPlayer3.Timer);
/*
this.ctEnd_ClearFailed = new CCounter(0, 69, 30, TJAPlayer3.Timer);
this.ctEnd_FullCombo = new CCounter(0, 66, 33, TJAPlayer3.Timer);
this.ctEnd_FullComboLoop = new CCounter(0, 2, 30, TJAPlayer3.Timer);
this.ctEnd_DondaFullCombo = new CCounter(0, 61, 33, TJAPlayer3.Timer);
this.ctEnd_DondaFullComboLoop = new CCounter(0, 2, 30, TJAPlayer3.Timer);
*/
// モードの決定。クリア失敗・フルコンボも事前に作っとく。
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower)
@ -134,6 +137,20 @@ namespace TJAPlayer3
this.b再生済み = false;
if (!base.b活性化してない)
{
var origindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.END}");
FailedScript = new EndAnimeScript($@"{origindir}ClearFailed\Script.lua");
FailedScript.Init();
ClearScript = new EndAnimeScript($@"{origindir}Clear\Script.lua");
ClearScript.Init();
FullComboScript = new EndAnimeScript($@"{origindir}FullCombo\Script.lua");
FullComboScript.Init();
DondaFullComboScript = new EndAnimeScript($@"{origindir}DondaFullCombo\Script.lua");
DondaFullComboScript.Init();
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
this.soundClear[i] = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Clear.ogg"), ESoundGroup.SoundEffect);
@ -150,6 +167,10 @@ namespace TJAPlayer3
{
if (!base.b活性化してない)
{
FailedScript.Dispose();
ClearScript.Dispose();
FullComboScript.Dispose();
DondaFullComboScript.Dispose();
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
this.soundClear[i]?.t解放する();
@ -166,8 +187,13 @@ namespace TJAPlayer3
// ------------------------------------
private void showEndEffect_Failed(int i)
{
FailedScript.Update(i);
FailedScript.Draw(i);
int[] y = new int[] { 0, 176 };
/*
this.ctEnd_ClearFailed.t進行();
if (this.ctEnd_ClearFailed.n現在の値 <= 20 || TJAPlayer3.Tx.ClearFailed == null)
{
@ -185,9 +211,14 @@ namespace TJAPlayer3
{
TJAPlayer3.Tx.ClearFailed2?.t2D描画(TJAPlayer3.app.Device, 502, y[i] + 192);
}
*/
}
private void showEndEffect_Clear(int i)
{
{
ClearScript.Update(i);
ClearScript.Draw(i);
/*
int[] y = new int[] { 210, 386 };
#region[ ]
//登場アニメは20フレーム。うち最初の5フレームは半透過状態。
@ -355,10 +386,16 @@ namespace TJAPlayer3
}
#endregion
*/
}
private void showEndEffect_FullCombo(int i)
{
FullComboScript.Update(i);
FullComboScript.Draw(i);
/*
int[] y = new int[] { 0, 176 };
this.ctEnd_FullCombo.t進行();
@ -369,10 +406,15 @@ namespace TJAPlayer3
this.ctEnd_FullComboLoop.t進行Loop();
TJAPlayer3.Tx.End_FullComboLoop[this.ctEnd_FullComboLoop.n現在の値]?.t2D描画(TJAPlayer3.app.Device, 330, y[i] + 196);
}
*/
}
private void showEndEffect_DondaFullCombo(int i)
{
{
DondaFullComboScript.Update(i);
DondaFullComboScript.Draw(i);
/*
int[] y = new int[] { 0, 176 };
this.ctEnd_DondaFullCombo.t進行();
@ -410,18 +452,22 @@ namespace TJAPlayer3
switch (this.Mode[i])
{
case EndMode.StageFailed:
FailedScript.PlayEndAnime(i);
this.soundFailed[i]?.t再生を開始する();
TJAPlayer3.Skin.voiceClearFailed[TJAPlayer3.GetActualPlayer(i)]?.t再生する();
break;
case EndMode.StageCleared:
ClearScript.PlayEndAnime(i);
this.soundClear[i]?.t再生を開始する();
TJAPlayer3.Skin.voiceClearClear[TJAPlayer3.GetActualPlayer(i)]?.t再生する();
break;
case EndMode.StageFullCombo:
FullComboScript.PlayEndAnime(i);
this.soundFullCombo[i]?.t再生を開始する();
TJAPlayer3.Skin.voiceClearFullCombo[TJAPlayer3.GetActualPlayer(i)]?.t再生する();
break;
case EndMode.StageDondaFullCombo:
DondaFullComboScript.PlayEndAnime(i);
this.soundDondaFullCombo[i]?.t再生を開始する();
TJAPlayer3.Skin.voiceClearAllPerfect[TJAPlayer3.GetActualPlayer(i)]?.t再生する();
break;
@ -465,20 +511,28 @@ namespace TJAPlayer3
}
return 0;
}
}
#region[ private ]
//-----------------
//-----------------
private EndAnimeScript FailedScript;
private EndAnimeScript ClearScript;
private EndAnimeScript FullComboScript;
private EndAnimeScript DondaFullComboScript;
bool b再生済み;
bool bリザルトボイス再生済み;
bool bSongsPlayed = false;
CCounter ct進行メイン;
/*
CCounter ctEnd_ClearFailed;
CCounter ctEnd_FullCombo;
CCounter ctEnd_FullComboLoop;
CCounter ctEnd_DondaFullCombo;
CCounter ctEnd_DondaFullComboLoop;
*/
CCounter ct進行Loop;
CSound[] soundClear = new CSound[4];

View File

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NLua;
using FDK;
namespace TJAPlayer3
{
class EndAnimeScript : ScriptBG
{
private LuaFunction LuaPlayEndAnime;
public EndAnimeScript(string filePath) : base(filePath)
{
if (LuaScript != null)
{
LuaPlayEndAnime = LuaScript.GetFunction("playEndAnime");
}
}
public new void Dispose()
{
base.Dispose();
LuaPlayEndAnime?.Dispose();
}
public void PlayEndAnime(int player)
{
if (LuaScript == null) return;
try
{
LuaPlayEndAnime.Call(player);
}
catch (Exception ex)
{
}
}
public new void Update(int player)
{
if (LuaScript == null) return;
try
{
float currentFloorPositionMax140 = 0;
if (TJAPlayer3.stage選曲.r確定された曲.arスコア[5] != null)
{
int maxFloor = TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
int nightTime = Math.Max(140, maxFloor / 2);
currentFloorPositionMax140 = Math.Min(TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] / (float)nightTime, 1f);
}
LuaUpdateValues.Call(TJAPlayer3.FPS.DeltaTime, TJAPlayer3.FPS.n現在のFPS, TJAPlayer3.stage演奏ドラム画面.bIsAlreadyCleared, (double)currentFloorPositionMax140);
/*LuaScript.SetObjectToPath("fps", TJAPlayer3.FPS.n現在のFPS);
LuaScript.SetObjectToPath("deltaTime", TJAPlayer3.FPS.DeltaTime);
LuaScript.SetObjectToPath("isClear", TJAPlayer3.stage演奏ドラム画面.bIsAlreadyCleared);
LuaScript.SetObjectToPath("towerNightOpacity", (double)(255 * currentFloorPositionMax140));*/
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) LuaUpdate.Call(player);
}
catch (Exception ex)
{
LuaScript.Dispose();
LuaScript = null;
}
}
public new void Draw(int player)
{
if (LuaScript == null) return;
try
{
LuaDraw.Call(player);
}
catch (Exception ex)
{
LuaScript.Dispose();
LuaScript = null;
}
}
}
}

View File

@ -35,6 +35,10 @@ namespace TJAPlayer3
{
Textures[fileName]?.t2D描画(TJAPlayer3.app.Device, (int)x, (int)y);
}
public void DrawRectGraph(double x, double y, int rect_x, int rect_y, int rect_width, int rect_height, string fileName)
{
Textures[fileName]?.t2D描画(TJAPlayer3.app.Device, (int)x, (int)y, new System.Drawing.RectangleF(rect_x, rect_y, rect_width, rect_height));
}
public void DrawGraphCenter(double x, double y, string fileName)
{
Textures[fileName]?.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, (int)x, (int)y);
@ -71,15 +75,15 @@ namespace TJAPlayer3
{
public Dictionary<string, CTexture> Textures;
private Lua LuaScript;
protected Lua LuaScript;
private LuaFunction LuaSetConstValues;
private LuaFunction LuaUpdateValues;
private LuaFunction LuaClearIn;
private LuaFunction LuaClearOut;
private LuaFunction LuaInit;
private LuaFunction LuaUpdate;
private LuaFunction LuaDraw;
protected LuaFunction LuaSetConstValues;
protected LuaFunction LuaUpdateValues;
protected LuaFunction LuaClearIn;
protected LuaFunction LuaClearOut;
protected LuaFunction LuaInit;
protected LuaFunction LuaUpdate;
protected LuaFunction LuaDraw;
public ScriptBG(string filePath)
{
@ -93,23 +97,30 @@ namespace TJAPlayer3
LuaScript["func"] = new ScriptBGFunc(Textures, Path.GetDirectoryName(filePath));
using (var streamAPI = new StreamReader("BGScriptAPI.lua", Encoding.UTF8))
try
{
using (var stream = new StreamReader(filePath, Encoding.UTF8))
using (var streamAPI = new StreamReader("BGScriptAPI.lua", Encoding.UTF8))
{
var text = $"{streamAPI.ReadToEnd()}\n{stream.ReadToEnd()}";
LuaScript.DoString(text);
using (var stream = new StreamReader(filePath, Encoding.UTF8))
{
var text = $"{streamAPI.ReadToEnd()}\n{stream.ReadToEnd()}";
LuaScript.DoString(text);
}
}
}
LuaSetConstValues = LuaScript.GetFunction("setConstValues");
LuaUpdateValues = LuaScript.GetFunction("updateValues");
LuaClearIn = LuaScript.GetFunction("clearIn");
LuaClearOut = LuaScript.GetFunction("clearOut");
LuaInit = LuaScript.GetFunction("init");
LuaUpdate = LuaScript.GetFunction("update");
LuaDraw = LuaScript.GetFunction("draw");
LuaSetConstValues = LuaScript.GetFunction("setConstValues");
LuaUpdateValues = LuaScript.GetFunction("updateValues");
LuaClearIn = LuaScript.GetFunction("clearIn");
LuaClearOut = LuaScript.GetFunction("clearOut");
LuaInit = LuaScript.GetFunction("init");
LuaUpdate = LuaScript.GetFunction("update");
LuaDraw = LuaScript.GetFunction("draw");
}
catch (Exception ex)
{
LuaScript.Dispose();
LuaScript = null;
}
}
public void Dispose()
{

View File

@ -153,6 +153,7 @@
<Compile Include="Songs\C曲リストードComparers\C曲リストードComparerSubtitle.cs" />
<Compile Include="Stages\01.StartUp\CCharacter.cs" />
<Compile Include="Stages\01.StartUp\CPuchichara.cs" />
<Compile Include="Stages\07.Game\Taiko\EndAnimeScript.cs" />
<Compile Include="Stages\07.Game\Taiko\NotesManager.cs" />
<Compile Include="Stages\07.Game\Taiko\ScriptBG.cs" />
<Compile Include="Stages\15.OpenEncyclopedia\CEncyclopediaControler.cs" />

View File

@ -0,0 +1,148 @@
--func:DrawText(x, y, text);
--func:DrawNum(x, y, num);
--func:AddGraph("filename");
--func:DrawGraph(x, y, filename);
--func:DrawRectGraph(x, y, rect_x, rect_y, rect_width, rect_height, filename);
--func:SetOpacity(opacity, "filename");
--func:SetScale(xscale, yscale, "filename");
--func:SetColor(r, g, b, "filename");
local y = { 210, 386 }
local sideTextureCount = 4
local animeCounter = { 0, 0 }
local nowFrame = { 0, 0 }
local textScales = { 1.04, 1.11, 1.15, 1.19, 1.23, 1.26, 1.30, 1.31, 1.32, 1.32, 1.32, 1.30, 1.30, 1.26, 1.25, 1.19, 1.15, 1.11, 1.05, 1.0 }
local textOpacitys = { 43, 85, 128, 170, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
local side_ret = { 1.0, 0.99, 0.98, 0.97, 0.96, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0 }
function clearIn(player)
end
function clearOut(player)
end
function playEndAnime(player)
animeCounter = { 0, 0 }
end
function init()
func:AddGraph("Clear_Text.png")
func:AddGraph("Clear_Text_Effect.png")
for i = 0 , sideTextureCount do
func:AddGraph("Clear_L_"..tostring(i)..".png")
func:AddGraph("Clear_R_"..tostring(i)..".png")
end
end
function update(player)
animeCounter[player + 1] = animeCounter[player + 1] + (45.4 * deltaTime)
nowFrame[player + 1] = math.floor(animeCounter[player + 1] + 0.5)
end
function draw(player)
if nowFrame[player + 1] >= 17 then
if nowFrame[player + 1] <= 36 then
func:SetScale(1.0, textScales[nowFrame[player + 1] - 17 + 1], "Clear_Text.png")
func:SetOpacity(textOpacitys[nowFrame[player + 1] - 17 + 1], "Clear_Text.png")
func:DrawRectGraph(634, y[player + 1] - ((90 * textScales[nowFrame[player + 1] - 17 + 1]) - 90), 0, 0, 90, 90, "Clear_Text.png")
else
func:SetScale(1.0, 1.0, "Clear_Text.png")
func:DrawRectGraph(634, y[player + 1], 0, 0, 90, 90, "Clear_Text.png")
end
end
if nowFrame[player + 1] >= 19 then
if nowFrame[player + 1] <= 38 then
func:SetScale(1.0, textScales[nowFrame[player + 1] - 19 + 1], "Clear_Text.png")
func:SetOpacity(textOpacitys[nowFrame[player + 1] - 19 + 1], "Clear_Text.png")
func:DrawRectGraph(692, y[player + 1] - ((90 * textScales[nowFrame[player + 1] - 19 + 1]) - 90), 90, 0, 90, 90, "Clear_Text.png")
else
func:SetScale(1.0, 1.0, "Clear_Text.png")
func:DrawRectGraph(692, y[player + 1], 90, 0, 90, 90, "Clear_Text.png")
end
end
if nowFrame[player + 1] >= 21 then
if nowFrame[player + 1] <= 40 then
func:SetScale(1.0, textScales[nowFrame[player + 1] - 21 + 1], "Clear_Text.png")
func:SetOpacity(textOpacitys[nowFrame[player + 1] - 21 + 1], "Clear_Text.png")
func:DrawRectGraph(750, y[player + 1] - ((90 * textScales[nowFrame[player + 1] - 21 + 1]) - 90), 180, 0, 90, 90, "Clear_Text.png")
else
func:SetScale(1.0, 1.0, "Clear_Text.png")
func:DrawRectGraph(750, y[player + 1], 180, 0, 90, 90, "Clear_Text.png")
end
end
if nowFrame[player + 1] >= 23 then
if nowFrame[player + 1] <= 42 then
func:SetScale(1.0, textScales[nowFrame[player + 1] - 23 + 1], "Clear_Text.png")
func:SetOpacity(textOpacitys[nowFrame[player + 1] - 23 + 1], "Clear_Text.png")
func:DrawRectGraph(819, y[player + 1] - ((90 * textScales[nowFrame[player + 1] - 23 + 1]) - 90), 270, 0, 90, 90, "Clear_Text.png")
else
func:SetScale(1.0, 1.0, "Clear_Text.png")
func:DrawRectGraph(819, y[player + 1], 270, 0, 90, 90, "Clear_Text.png")
end
end
if nowFrame[player + 1] >= 25 then
if nowFrame[player + 1] <= 44 then
func:SetScale(1.0, textScales[nowFrame[player + 1] - 25 + 1], "Clear_Text.png")
func:SetOpacity(textOpacitys[nowFrame[player + 1] - 25 + 1], "Clear_Text.png")
func:DrawRectGraph(890, y[player + 1] + 2 - ((90 * textScales[nowFrame[player + 1] - 25 + 1]) - 90), 360, 0, 90, 90, "Clear_Text.png")
else
func:SetScale(1.0, 1.0, "Clear_Text.png")
func:DrawRectGraph(890, y[player + 1] + 2, 360, 0, 90, 90, "Clear_Text.png")
end
end
if nowFrame[player + 1] >= 50 and nowFrame[player + 1] < 90 then
if nowFrame[player + 1] < 70 then
func:SetOpacity((nowFrame[player + 1] - 50) * (255 / 20), "Clear_Text_Effect.png")
func:DrawGraph(634, y[player + 1] - 2, "Clear_Text_Effect.png")
else
func:SetOpacity(255 - ((nowFrame[player + 1] - 70) * (255 / 20)), "Clear_Text_Effect.png")
func:DrawGraph(634, y[player + 1] - 2, "Clear_Text_Effect.png")
end
end
if nowFrame[player + 1] <= 11 then
func:DrawGraph(697, y[player + 1] - 30, "Clear_L_1.png")
func:SetOpacity((11.0 / nowFrame[player + 1]) * 255, "Clear_L_1.png")
func:DrawGraph(738, y[player + 1] - 30, "Clear_R_1.png")
func:SetOpacity((11.0 / nowFrame[player + 1]) * 255, "Clear_R_1.png")
elseif nowFrame[player + 1] <= 35 then
func:DrawGraph(697 - ((nowFrame[player + 1] - 12) * 10), y[player + 1] - 30, "Clear_L_0.png")
func:DrawGraph(738 + ((nowFrame[player + 1] - 12) * 10), y[player + 1] - 30, "Clear_R_0.png")
elseif nowFrame[player + 1] <= 46 then
func:DrawGraph(466, y[player + 1] - 30, "Clear_L_0.png")
func:SetScale(side_ret[nowFrame[player + 1] - 36 + 1], 1.0, "Clear_L_0.png")
func:DrawGraph(1136 - 180 * side_ret[nowFrame[player + 1] - 36 + 1], y[player + 1] - 30, "Clear_R_0.png")
func:SetScale(side_ret[nowFrame[player + 1] - 36 + 1], 1.0, "Clear_R_0.png")
elseif nowFrame[player + 1] <= 49 then
func:DrawGraph(466, y[player + 1] - 30, "Clear_L_1.png")
func:DrawGraph(956, y[player + 1] - 30, "Clear_R_1.png")
elseif nowFrame[player + 1] <= 54 then
func:DrawGraph(466, y[player + 1] - 30, "Clear_L_2.png")
func:DrawGraph(956, y[player + 1] - 30, "Clear_R_2.png")
elseif nowFrame[player + 1] <= 58 then
func:DrawGraph(466, y[player + 1] - 30, "Clear_L_3.png")
func:DrawGraph(956, y[player + 1] - 30, "Clear_R_3.png")
else
func:DrawGraph(466, y[player + 1] - 30, "Clear_L_4.png")
func:DrawGraph(956, y[player + 1] - 30, "Clear_R_4.png")
end
func:DrawNum(0, 0, nowFrame[player + 1])
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,57 @@
--func:DrawText(x, y, text);
--func:DrawNum(x, y, num);
--func:AddGraph("filename");
--func:DrawGraph(x, y, filename);
--func:SetOpacity(opacity, "filename");
--func:SetScale(xscale, yscale, "filename");
--func:SetColor(r, g, b, "filename");
local x = { 505, 505 }
local y = { 145, 321 }
local animeCounter = { 0, 0 }
local nowFrame = { 0, 0 }
local textureCount = 25
local useExtraAnime = true
function clearIn(player)
end
function clearOut(player)
end
function playEndAnime(player)
animeCounter = { 0, 0 }
nowFrame = { 0, 0 }
end
function init()
for i = 0 , textureCount do
func:AddGraph(tostring(i)..".png")
end
if useExtraAnime then
func:AddGraph("Clear_Failed.png")
func:AddGraph("Clear_Failed1.png")
func:AddGraph("Clear_Failed2.png")
end
end
function update(player)
animeCounter[player + 1] = animeCounter[player + 1] + (33.3 * deltaTime)
nowFrame[player + 1] = math.floor(animeCounter[player + 1] + 0.5)
end
function draw(player)
if nowFrame[player + 1] <= 20 or not(useExtraAnime) then
func:DrawGraph(x[player + 1], y[player + 1], tostring(math.min(nowFrame[player + 1], textureCount))..".png")
elseif nowFrame[player + 1] >= 20 and nowFrame[player + 1] <= 67 then
func:DrawGraph(x[player + 1] - 3, y[player + 1] + 47, "Clear_Failed.png")
elseif nowFrame[player + 1] == 68 then
func:DrawGraph(x[player + 1] - 3, y[player + 1] + 47, "Clear_Failed1.png")
elseif nowFrame[player + 1] >= 69 then
func:DrawGraph(x[player + 1] - 3, y[player + 1] + 47, "Clear_Failed2.png")
end
end

View File

@ -0,0 +1,47 @@
--func:DrawText(x, y, text);
--func:DrawNum(x, y, num);
--func:AddGraph("filename");
--func:DrawGraph(x, y, filename);
--func:SetOpacity(opacity, "filename");
--func:SetScale(xscale, yscale, "filename");
--func:SetColor(r, g, b, "filename");
local x = { 332, 332 }
local y = { 192, 368 }
local animeCounter = { 0, 0 }
local nowFrame = { 0, 0 }
local textureCount = 61
function clearIn(player)
end
function clearOut(player)
end
function playEndAnime(player)
animeCounter = { 0, 0 }
nowFrame = { 0, 0 }
end
function init()
func:AddGraph("bg.png")
for i = 0 , textureCount do
func:AddGraph(tostring(i)..".png")
end
end
function update(player)
animeCounter[player + 1] = animeCounter[player + 1] + (30.3 * deltaTime)
nowFrame[player + 1] = math.floor(animeCounter[player + 1] + 0.5)
end
function draw(player)
if nowFrame[player + 1] >= 34 then
func:DrawGraph(x[player + 1], y[player + 1], "bg.png")
end
if nowFrame[player + 1] <= 20 or not(useExtraAnime) then
func:DrawGraph(x[player + 1] - 2, y[player + 1] - 142, tostring(math.min(nowFrame[player + 1], textureCount))..".png")
end
end

View File

@ -0,0 +1,43 @@
--func:DrawText(x, y, text);
--func:DrawNum(x, y, num);
--func:AddGraph("filename");
--func:DrawGraph(x, y, filename);
--func:SetOpacity(opacity, "filename");
--func:SetScale(xscale, yscale, "filename");
--func:SetColor(r, g, b, "filename");
local x = { 330, 330 }
local y = { 50, 226 }
local animeCounter = { 0, 0 }
local nowFrame = { 0, 0 }
local textureCount = 66
function clearIn(player)
end
function clearOut(player)
end
function playEndAnime(player)
animeCounter = { 0, 0 }
nowFrame = { 0, 0 }
end
function init()
for i = 0 , textureCount do
func:AddGraph(tostring(i)..".png")
end
end
function update(player)
animeCounter[player + 1] = animeCounter[player + 1] + (30.3 * deltaTime)
nowFrame[player + 1] = math.floor(animeCounter[player + 1] + 0.5)
end
function draw(player)
if nowFrame[player + 1] <= 20 or not(useExtraAnime) then
func:DrawGraph(x[player + 1], y[player + 1], tostring(math.min(nowFrame[player + 1], textureCount))..".png")
end
end