Runnerに対応 (#395)
This commit is contained in:
parent
2c06b76727
commit
2fa885831f
@ -4872,46 +4872,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Runner
|
||||
else if (strCommand == "Game_Runner_Size")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Game_Runner_Size[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Runner_Ptn")
|
||||
{
|
||||
ParseInt32(value => Game_Runner_Ptn = value);
|
||||
}
|
||||
else if (strCommand == "Game_Runner_Type")
|
||||
{
|
||||
ParseInt32(value => Game_Runner_Type = value);
|
||||
}
|
||||
else if (strCommand == "Game_Runner_StartPoint_X")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Game_Runner_StartPoint_X[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Runner_StartPoint_Y")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Game_Runner_StartPoint_Y[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Runner_Timer")
|
||||
{
|
||||
if (int.Parse(strParam) != 0)
|
||||
{
|
||||
Game_Runner_Timer = int.Parse(strParam);
|
||||
}
|
||||
}
|
||||
#region Runner
|
||||
#endregion
|
||||
|
||||
#region Dan_C
|
||||
@ -8207,12 +8168,6 @@ namespace TJAPlayer3
|
||||
public int[] Game_Lane_5P = new int[] { 333, 39 };
|
||||
#endregion
|
||||
#region Runner
|
||||
public int[] Game_Runner_Size = new int[] { 60, 125 };
|
||||
public int Game_Runner_Ptn = 48;
|
||||
public int Game_Runner_Type = 4;
|
||||
public int[] Game_Runner_StartPoint_X = new int[] { 175, 175 };
|
||||
public int[] Game_Runner_StartPoint_Y = new int[] { 40, 560 };
|
||||
public int Game_Runner_Timer = 16;
|
||||
#endregion
|
||||
#region PuchiChara
|
||||
public int[] Game_PuchiChara_X = new int[] { 100, 100 };
|
||||
|
@ -50,7 +50,7 @@ namespace TJAPlayer3
|
||||
const string GENRE = @"13_Genre\";
|
||||
const string GAMEMODE = @"14_GameMode\";
|
||||
const string FAILED = @"15_Failed\";
|
||||
const string RUNNER = @"16_Runner\";
|
||||
public const string RUNNER = @"16_Runner\";
|
||||
const string TRAINING = @"19_Training\";
|
||||
const string DANC = @"17_DanC\";
|
||||
const string TOWER = @"20_Tower\";
|
||||
@ -705,7 +705,7 @@ namespace TJAPlayer3
|
||||
|
||||
#region Runner
|
||||
|
||||
Runner = TxC(GAME + RUNNER + @"0.png");
|
||||
//Runner = TxC(GAME + RUNNER + @"0.png");
|
||||
|
||||
#endregion
|
||||
|
||||
@ -2082,7 +2082,7 @@ namespace TJAPlayer3
|
||||
Failed_Stage;
|
||||
#endregion
|
||||
#region ランナー
|
||||
public CTexture Runner;
|
||||
//public CTexture Runner;
|
||||
#endregion
|
||||
#region DanC
|
||||
public CTexture DanC_Background;
|
||||
|
@ -24,7 +24,6 @@ namespace TJAPlayer3
|
||||
}*/
|
||||
|
||||
NullCheckAndRender(ref TJAPlayer3.Tx.Effects_GoGoSplash);
|
||||
NullCheckAndRender(ref TJAPlayer3.Tx.Runner);
|
||||
for (int i = 0; i < TJAPlayer3.Skin.Game_Mob_Ptn; i++)
|
||||
{
|
||||
NullCheckAndRender(ref TJAPlayer3.Tx.Mob[i]);
|
||||
|
@ -751,6 +751,7 @@ namespace TJAPlayer3
|
||||
protected CAct演奏PauseMenu actPauseMenu;
|
||||
public CAct演奏Drumsチップエフェクト actChipEffects;
|
||||
public CAct演奏DrumsFooter actFooter;
|
||||
public CAct演奏DrumsRunner actRunner;
|
||||
public CAct演奏DrumsMob actMob;
|
||||
public Dan_Cert actDan;
|
||||
public AIBattle actAIBattle;
|
||||
@ -1742,6 +1743,9 @@ namespace TJAPlayer3
|
||||
{
|
||||
double dbUnit = (((60.0 / (TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM[nPlayer]))));
|
||||
|
||||
// ランナー(たたけたやつ)
|
||||
this.actRunner.Start(nPlayer, false, pChip);
|
||||
|
||||
int Character = this.actChara.iCurrentCharacter[nPlayer];
|
||||
|
||||
if ((int)actGauge.db現在のゲージ値[nPlayer] >= 100 && this.bIsAlreadyMaxed[nPlayer] == false)
|
||||
@ -1764,7 +1768,9 @@ namespace TJAPlayer3
|
||||
}
|
||||
|
||||
if ( eJudgeResult == E判定.Poor || eJudgeResult == E判定.Miss || eJudgeResult == E判定.Bad )
|
||||
{
|
||||
{
|
||||
// ランナー(みすったやつ)
|
||||
this.actRunner.Start(nPlayer, true, pChip);
|
||||
if ((int)actGauge.db現在のゲージ値[nPlayer] < 100 && this.bIsAlreadyMaxed[nPlayer] == true)
|
||||
{
|
||||
this.bIsAlreadyMaxed[nPlayer] = false;
|
||||
|
256
TJAPlayer3/Stages/07.Game/Taiko/CAct演奏DrumsRunner.cs
Normal file
256
TJAPlayer3/Stages/07.Game/Taiko/CAct演奏DrumsRunner.cs
Normal file
@ -0,0 +1,256 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using FDK;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace TJAPlayer3
|
||||
{
|
||||
internal class CAct演奏DrumsRunner : CActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// ランナー
|
||||
/// </summary>
|
||||
public CAct演奏DrumsRunner()
|
||||
{
|
||||
base.b活性化してない = true;
|
||||
}
|
||||
|
||||
public void Start(int Player, bool IsMiss, CDTX.CChip pChip)
|
||||
{
|
||||
if (Runner != null)
|
||||
{
|
||||
while (stRunners[Index].b使用中)
|
||||
{
|
||||
Index += 1;
|
||||
if (Index >= 128)
|
||||
{
|
||||
Index = 0;
|
||||
break; // 2018.6.15 IMARER 無限ループが発生するので修正
|
||||
}
|
||||
}
|
||||
if (pChip.nチャンネル番号 < 0x15 || (pChip.nチャンネル番号 >= 0x1A))
|
||||
{
|
||||
if (!stRunners[Index].b使用中)
|
||||
{
|
||||
stRunners[Index].b使用中 = true;
|
||||
stRunners[Index].nPlayer = Player;
|
||||
if (IsMiss == true)
|
||||
{
|
||||
stRunners[Index].nType = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
stRunners[Index].nType = random.Next(1, Type + 1);
|
||||
}
|
||||
stRunners[Index].ct進行 = new CCounter(0, TJAPlayer3.Skin.Resolution[0], Timer, TJAPlayer3.Timer);
|
||||
stRunners[Index].nOldValue = 0;
|
||||
stRunners[Index].nNowPtn = 0;
|
||||
stRunners[Index].fX = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void On活性化()
|
||||
{
|
||||
for (int i = 0; i < 128; i++)
|
||||
{
|
||||
stRunners[i] = new STRunner();
|
||||
stRunners[i].b使用中 = false;
|
||||
stRunners[i].ct進行 = new CCounter();
|
||||
}
|
||||
|
||||
// フィールド上で代入してたためこちらへ移動。
|
||||
base.On活性化();
|
||||
}
|
||||
|
||||
public override void On非活性化()
|
||||
{
|
||||
for (int i = 0; i < 128; i++)
|
||||
{
|
||||
stRunners[i].ct進行 = null;
|
||||
}
|
||||
base.On非活性化();
|
||||
}
|
||||
|
||||
public override void OnManagedリソースの作成()
|
||||
{
|
||||
Random random = new Random();
|
||||
|
||||
var dancerOrigindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.RUNNER}");
|
||||
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)];
|
||||
LoadRunnerConifg(path);
|
||||
|
||||
Runner = TJAPlayer3.tテクスチャの生成($@"{path}\Runner.png");
|
||||
}
|
||||
}
|
||||
base.OnManagedリソースの作成();
|
||||
}
|
||||
|
||||
public override void OnManagedリソースの解放()
|
||||
{
|
||||
TJAPlayer3.t安全にDisposeする(ref Runner);
|
||||
base.OnManagedリソースの解放();
|
||||
}
|
||||
|
||||
public override int On進行描画()
|
||||
{
|
||||
for (int i = 0; i < 128; i++)
|
||||
{
|
||||
if (stRunners[i].b使用中)
|
||||
{
|
||||
stRunners[i].nOldValue = stRunners[i].ct進行.n現在の値;
|
||||
stRunners[i].ct進行.t進行();
|
||||
if (stRunners[i].ct進行.b終了値に達した || stRunners[i].fX > TJAPlayer3.Skin.Resolution[0])
|
||||
{
|
||||
stRunners[i].ct進行.t停止();
|
||||
stRunners[i].b使用中 = false;
|
||||
}
|
||||
for (int n = stRunners[i].nOldValue; n < stRunners[i].ct進行.n現在の値; n++)
|
||||
{
|
||||
stRunners[i].fX += (float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM[stRunners[i].nPlayer] / 18;
|
||||
int Width = TJAPlayer3.Skin.Resolution[0] / Ptn;
|
||||
stRunners[i].nNowPtn = (int)stRunners[i].fX / Width;
|
||||
}
|
||||
if (Runner != null)
|
||||
{
|
||||
if (stRunners[i].nPlayer == 0)
|
||||
{
|
||||
Runner.t2D描画(TJAPlayer3.app.Device, (int)(StartPoint_X[0] + stRunners[i].fX), StartPoint_Y[0], new Rectangle(stRunners[i].nNowPtn * Size[0], stRunners[i].nType * Size[1], Size[0], Size[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
Runner.t2D描画(TJAPlayer3.app.Device, (int)(StartPoint_X[1] + stRunners[i].fX), StartPoint_Y[1], new Rectangle(stRunners[i].nNowPtn * Size[0], stRunners[i].nType * Size[1], Size[0], Size[1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return base.On進行描画();
|
||||
}
|
||||
|
||||
#region[ private ]
|
||||
//-----------------
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct STRunner
|
||||
{
|
||||
public bool b使用中;
|
||||
public int nPlayer;
|
||||
public int nType;
|
||||
public int nOldValue;
|
||||
public int nNowPtn;
|
||||
public float fX;
|
||||
public CCounter ct進行;
|
||||
}
|
||||
private STRunner[] stRunners = new STRunner[128];
|
||||
Random random = new Random();
|
||||
int Index = 0;
|
||||
|
||||
private CTexture Runner;
|
||||
|
||||
private void LoadRunnerConifg(string dancerPath)
|
||||
{
|
||||
var _str = "";
|
||||
TJAPlayer3.Skin.LoadSkinConfigFromFile(dancerPath + @"\RunnerConfig.txt", ref _str);
|
||||
|
||||
string[] delimiter = { "\n" };
|
||||
string[] strSingleLine = _str.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
Size = new int[2] { 60, 125 };
|
||||
Ptn = 48;
|
||||
Type = 4;
|
||||
StartPoint_X = new int[2] { 175, 175 };
|
||||
StartPoint_Y = new int[2] { 40, 560 };
|
||||
Timer = 16;
|
||||
|
||||
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_Runner_Size")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Size[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Runner_Ptn")
|
||||
{
|
||||
Ptn = int.Parse(strParam);
|
||||
}
|
||||
else if (strCommand == "Game_Runner_Type")
|
||||
{
|
||||
Type = int.Parse(strParam);
|
||||
}
|
||||
else if (strCommand == "Game_Runner_Timer")
|
||||
{
|
||||
Timer = int.Parse(strParam);
|
||||
}
|
||||
else if (strCommand == "Game_Runner_StartPoint_X")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
StartPoint_X[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "Game_Runner_StartPoint_Y")
|
||||
{
|
||||
string[] strSplit = strParam.Split(',');
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
StartPoint_Y[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
continue;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Trace.TraceError(exception.ToString());
|
||||
Trace.TraceError("例外が発生しましたが処理を継続します。 (6a32cc37-1527-412e-968a-512c1f0135cd)");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ランナー画像のサイズ。 X, Y
|
||||
private int[] Size;
|
||||
// ランナーのコマ数
|
||||
private int Ptn;
|
||||
// ランナーのキャラクターのバリエーション(ミス時を含まない)。
|
||||
private int Type;
|
||||
private int Timer;
|
||||
// スタート地点のX座標 1P, 2P
|
||||
private int[] StartPoint_X;
|
||||
// スタート地点のY座標 1P, 2P
|
||||
private int[] StartPoint_Y;
|
||||
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -61,6 +61,7 @@ namespace TJAPlayer3
|
||||
base.list子Activities.Add( this.actPauseMenu = new CAct演奏PauseMenu() );
|
||||
base.list子Activities.Add(this.actChipEffects = new CAct演奏Drumsチップエフェクト());
|
||||
base.list子Activities.Add(this.actFooter = new CAct演奏DrumsFooter());
|
||||
base.list子Activities.Add(this.actRunner = new CAct演奏DrumsRunner());
|
||||
base.list子Activities.Add(this.actMob = new CAct演奏DrumsMob());
|
||||
base.list子Activities.Add(this.GoGoSplash = new GoGoSplash());
|
||||
base.list子Activities.Add(this.FlyingNotes = new FlyingNotes());
|
||||
@ -464,10 +465,14 @@ namespace TJAPlayer3
|
||||
this.t進行描画_チップアニメ();
|
||||
|
||||
this.actLaneTaiko.On進行描画();
|
||||
//this.t進行描画_レーン();
|
||||
//this.t進行描画_レーンフラッシュD();
|
||||
|
||||
if( ( TJAPlayer3.ConfigIni.eClipDispType == EClipDispType.ウィンドウのみ || TJAPlayer3.ConfigIni.eClipDispType == EClipDispType.両方 ) && TJAPlayer3.ConfigIni.nPlayerCount == 1 )
|
||||
if (TJAPlayer3.ConfigIni.ShowRunner && !TJAPlayer3.ConfigIni.bAIBattleMode && TJAPlayer3.ConfigIni.nPlayerCount <= 2)
|
||||
this.actRunner.On進行描画();
|
||||
|
||||
//this.t進行描画_レーン();
|
||||
//this.t進行描画_レーンフラッシュD();
|
||||
|
||||
if ( ( TJAPlayer3.ConfigIni.eClipDispType == EClipDispType.ウィンドウのみ || TJAPlayer3.ConfigIni.eClipDispType == EClipDispType.両方 ) && TJAPlayer3.ConfigIni.nPlayerCount == 1 )
|
||||
this.actAVI.t窓表示();
|
||||
|
||||
if( !TJAPlayer3.ConfigIni.bNoInfo && !TJAPlayer3.ConfigIni.bTokkunMode)
|
||||
|
@ -155,6 +155,7 @@
|
||||
<Compile Include="Stages\01.StartUp\CCharacter.cs" />
|
||||
<Compile Include="Stages\01.StartUp\CPuchichara.cs" />
|
||||
<Compile Include="Stages\07.Game\Taiko\AIBattle.cs" />
|
||||
<Compile Include="Stages\07.Game\Taiko\CAct演奏DrumsRunner.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" />
|
||||
|
@ -23,6 +23,7 @@ move /Y "%24%28TargetDir%29\SlimDXc_net20x86_Jun2010.dll" "%24%28TargetDir%29dll
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>ja-JP</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<StartArguments>copy /Y "%24%28TargetPath%29" "%24%28SolutionDir%29\実行時フォルダ"
|
||||
|
BIN
Test/System/SimpleStyle/Graphics/5_Game/16_Runner/0/Runner.png
Normal file
BIN
Test/System/SimpleStyle/Graphics/5_Game/16_Runner/0/Runner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 783 KiB |
@ -0,0 +1,14 @@
|
||||
|
||||
Game_Runner_Size=60,125
|
||||
|
||||
Game_Runner_Ptn=48
|
||||
|
||||
Game_Runner_Type=4
|
||||
|
||||
|
||||
Game_Runner_StartPoint_X=175,175
|
||||
|
||||
Game_Runner_StartPoint_Y=40,560
|
||||
|
||||
|
||||
Game_Runner_Timer=16
|
Loading…
Reference in New Issue
Block a user