parent
de79490113
commit
753fb6ec5c
@ -1552,43 +1552,6 @@ namespace TJAPlayer3
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Dancer
|
||||
else if (strCommand == "Game_Dancer_X")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Game_Dancer_X[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Dancer_Y")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Game_Dancer_Y[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Dancer_Motion")
|
||||
{
|
||||
Game_Dancer_Motion = strParam;
|
||||
}
|
||||
// Game_Dancer_PtnはTextrueLoader.csで反映されます。
|
||||
else if (strCommand == "Game_Dancer_Beat")
|
||||
{
|
||||
ParseInt32(value => Game_Dancer_Beat = value);
|
||||
}
|
||||
else if (strCommand == "Game_Dancer_Gauge")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Game_Dancer_Gauge[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Mob
|
||||
else if (strCommand == "Game_Mob_Beat")
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace TJAPlayer3
|
||||
const string TOWERSELECT = @"13_TowerSelect\";
|
||||
|
||||
// InGame
|
||||
const string DANCER = @"2_Dancer\";
|
||||
public const string DANCER = @"2_Dancer\";
|
||||
const string MOB = @"3_Mob\";
|
||||
const string COURSESYMBOL = @"4_CourseSymbol\";
|
||||
public const string BACKGROUND = @"5_Background\";
|
||||
@ -368,24 +368,6 @@ namespace TJAPlayer3
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dancer
|
||||
|
||||
TJAPlayer3.Skin.Game_Dancer_Ptn = TJAPlayer3.t連番画像の枚数を数える(CSkin.Path(BASE + GAME + DANCER + @"1\"));
|
||||
if (TJAPlayer3.Skin.Game_Dancer_Ptn != 0)
|
||||
{
|
||||
Dancer = new CTexture[5][];
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dancer[i] = new CTexture[TJAPlayer3.Skin.Game_Dancer_Ptn];
|
||||
for (int p = 0; p < TJAPlayer3.Skin.Game_Dancer_Ptn; p++)
|
||||
{
|
||||
Dancer[i][p] = TxC(GAME + DANCER + (i + 1) + @"\" + p.ToString() + ".png");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mob
|
||||
|
||||
TJAPlayer3.Skin.Game_Mob_Ptn = TJAPlayer3.t連番画像の枚数を数える(CSkin.Path(BASE + GAME + MOB));
|
||||
@ -1725,9 +1707,6 @@ namespace TJAPlayer3
|
||||
#endregion
|
||||
|
||||
|
||||
#region 踊り子
|
||||
public CTexture[][] Dancer;
|
||||
#endregion
|
||||
#region モブ
|
||||
public CTexture[] Mob;
|
||||
#endregion
|
||||
|
@ -15,13 +15,13 @@ namespace TJAPlayer3
|
||||
|
||||
public void Render()
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
/*for (int i = 0; i < 5; i++)
|
||||
{
|
||||
for (int k = 0; k < TJAPlayer3.Skin.Game_Dancer_Ptn; k++)
|
||||
{
|
||||
NullCheckAndRender(ref TJAPlayer3.Tx.Dancer[i][k]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
NullCheckAndRender(ref TJAPlayer3.Tx.Effects_GoGoSplash);
|
||||
NullCheckAndRender(ref TJAPlayer3.Tx.Runner);
|
||||
|
@ -4,6 +4,7 @@ using System.Text;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using FDK;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace TJAPlayer3
|
||||
{
|
||||
@ -31,6 +32,33 @@ namespace TJAPlayer3
|
||||
|
||||
public override void OnManagedリソースの作成()
|
||||
{
|
||||
Random random = new Random();
|
||||
Dancer = new CTexture[5][];
|
||||
|
||||
var dancerOrigindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.DANCER}");
|
||||
if (System.IO.Directory.Exists($@"{dancerOrigindir}"))
|
||||
{
|
||||
var dirs = System.IO.Directory.GetDirectories($@"{dancerOrigindir}");
|
||||
if (dirs.Length > 0)
|
||||
{
|
||||
var path = dirs[random.Next(0, dirs.Length)];
|
||||
LoadDancerConifg(path);
|
||||
|
||||
TJAPlayer3.Skin.Game_Dancer_Ptn = TJAPlayer3.t連番画像の枚数を数える($@"{path}\1\");
|
||||
if (TJAPlayer3.Skin.Game_Dancer_Ptn != 0)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dancer[i] = new CTexture[TJAPlayer3.Skin.Game_Dancer_Ptn];
|
||||
for (int p = 0; p < TJAPlayer3.Skin.Game_Dancer_Ptn; p++)
|
||||
{
|
||||
Dancer[i][p] = TJAPlayer3.tテクスチャの生成($@"{path}\{(i + 1)}\{p}.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.ar踊り子モーション番号 = C変換.ar配列形式のstringをint配列に変換して返す(TJAPlayer3.Skin.Game_Dancer_Motion);
|
||||
if(this.ar踊り子モーション番号 == null) ar踊り子モーション番号 = C変換.ar配列形式のstringをint配列に変換して返す("0,0");
|
||||
this.ct踊り子モーション = new CCounter(0, this.ar踊り子モーション番号.Length - 1, 0.01, CSound管理.rc演奏用タイマ);
|
||||
@ -39,6 +67,11 @@ namespace TJAPlayer3
|
||||
|
||||
public override void OnManagedリソースの解放()
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
TJAPlayer3.t安全にDisposeする(ref Dancer[i]);
|
||||
}
|
||||
|
||||
base.OnManagedリソースの解放();
|
||||
}
|
||||
|
||||
@ -57,10 +90,10 @@ namespace TJAPlayer3
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (TJAPlayer3.Tx.Dancer[i][this.ar踊り子モーション番号[(int)this.ct踊り子モーション.n現在の値]] != null)
|
||||
if (this.Dancer[i] != null && this.Dancer[i][this.ar踊り子モーション番号[(int)this.ct踊り子モーション.n現在の値]] != null)
|
||||
{
|
||||
if ((int)TJAPlayer3.stage演奏ドラム画面.actGauge.db現在のゲージ値[0] >= TJAPlayer3.Skin.Game_Dancer_Gauge[i])
|
||||
TJAPlayer3.Tx.Dancer[i][this.ar踊り子モーション番号[(int)this.ct踊り子モーション.n現在の値]].t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Dancer_X[i], TJAPlayer3.Skin.Game_Dancer_Y[i]);
|
||||
this.Dancer[i][this.ar踊り子モーション番号[(int)this.ct踊り子モーション.n現在の値]].t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Dancer_X[i], TJAPlayer3.Skin.Game_Dancer_Y[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -73,6 +106,79 @@ namespace TJAPlayer3
|
||||
//-----------------
|
||||
public int[] ar踊り子モーション番号;
|
||||
public CCounter ct踊り子モーション;
|
||||
private CTexture[][] Dancer;
|
||||
|
||||
private void LoadDancerConifg(string dancerPath)
|
||||
{
|
||||
var _str = "";
|
||||
TJAPlayer3.Skin.LoadSkinConfigFromFile(dancerPath + @"\DancerConfig.txt", ref _str);
|
||||
|
||||
string[] delimiter = { "\n" };
|
||||
string[] strSingleLine = _str.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (string s in strSingleLine)
|
||||
{
|
||||
string str = s.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' });
|
||||
if ((str.Length != 0) && (str[0] != ';'))
|
||||
{
|
||||
try
|
||||
{
|
||||
string strCommand;
|
||||
string strParam;
|
||||
string[] strArray = str.Split(new char[] { '=' });
|
||||
|
||||
if (strArray.Length == 2)
|
||||
{
|
||||
strCommand = strArray[0].Trim();
|
||||
strParam = strArray[1].Trim();
|
||||
|
||||
if (strCommand == "Game_Dancer_X")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
TJAPlayer3.Skin.Game_Dancer_X[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Dancer_Y")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
TJAPlayer3.Skin.Game_Dancer_Y[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Dancer_Motion")
|
||||
{
|
||||
TJAPlayer3.Skin.Game_Dancer_Motion = strParam;
|
||||
}
|
||||
// Game_Dancer_PtnはTextrueLoader.csで反映されます。
|
||||
else if (strCommand == "Game_Dancer_Beat")
|
||||
{
|
||||
TJAPlayer3.Skin.Game_Dancer_Beat = int.Parse(strParam);
|
||||
}
|
||||
else if (strCommand == "Game_Dancer_Gauge")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
TJAPlayer3.Skin.Game_Dancer_Gauge[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
continue;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Trace.TraceError(exception.ToString());
|
||||
Trace.TraceError("例外が発生しましたが処理を継続します。 (6a32cc37-1527-412e-968a-512c1f0135cd)");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user