1
0
mirror of synced 2024-11-24 07:30:21 +01:00

Medals lol

This commit is contained in:
0aubsq 2021-11-06 19:21:22 +01:00
parent 82ce9f0fe3
commit 5977e845f1
5 changed files with 72 additions and 13 deletions

View File

@ -244,7 +244,8 @@ Pキーを長押ししてください。
## 短期で実装する予定機能
```
☐ 道場結果画面を実装し切る
☐ コイン(ドンメダル)を貯蓄可能にする機能を実装+ドンメダル商店
☑ コイン(ドンメダル)を貯蓄可能にする機能を実装
☐ ドンメダル商店
☑ タワーを実装し切る (COURSE: 5)
☐ タワー結果画面を実装し切る
☐ 複数な背景と踊り子セットを選べる機能を実装

View File

@ -13,25 +13,72 @@ namespace TJAPlayer3
public void tNamePlateConfig()
{
if (!File.Exists("NamePlate.json"))
ConfigManager.SaveConfig(data, "NamePlate.json");
tSaveFile();
data = ConfigManager.GetConfig<Data>(@"NamePlate.json");
tLoadFile();
}
#region [Medals]
public void tEarnCoins(int[] amounts)
{
if (amounts.Length < 2)
return;
for (int i = 0; i < 2; i++)
data.Medals[i] += amounts[i];
tSaveFile();
}
// Return false if the current amount of coins is to low
public bool tSpendCoins(int amount, int player)
{
if (player > 1 || player < 0)
return false;
if (data.Medals[player] < amount)
return false;
data.Medals[player] -= amount;
tSaveFile();
return true;
}
#endregion
public class Data
{
public string[] Name = { "どんちゃん", "かっちゃん" };
public string[] Title = { "どんちゃんですよ!", "かっちゃんですよ!" };
public string[] Dan = { "達人", "達人" };
public string[] Name = { "プレイヤー1", "プレイヤー2" };
public string[] Title = { "初心者", "初心者" };
public string[] Dan = { "素人", "素人" };
public bool[] DanGold = { false, false };
public int[] DanType = { 1, 2 };
public int[] TitleType = { 1, 2 };
public int[] DanType = { 0, 0 };
public int[] TitleType = { 1, 1 };
public int[] PuchiChara = { 2, 11 };
public int[] Medals = { 0, 0 };
}
public Data data = new Data();
#region [private]
private void tSaveFile()
{
ConfigManager.SaveConfig(data, "NamePlate.json");
}
private void tLoadFile()
{
data = ConfigManager.GetConfig<Data>(@"NamePlate.json");
}
#endregion
}
}

View File

@ -510,7 +510,7 @@ namespace TJAPlayer3
" automatically." );
this.list項目リスト.Add( this.iTaikoAutoPlay );
this.iTaikoAutoPlay2P = new CItemToggle( "AUTO PLAY 2P", TJAPlayer3.ConfigIni.b太鼓パートAutoPlay,
this.iTaikoAutoPlay2P = new CItemToggle( "AUTO PLAY 2P", TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P,
"すべての音符を自動で演奏します。\n" +
"",
"To play both Taiko\n" +

View File

@ -908,11 +908,15 @@ namespace TJAPlayer3
#endregion
// Current board
for (int i = 0; i < 10; i++)
{
tBoardNumberDraw(this.ptBoardNumber[i].X - 10, this.ptBoardNumber[i].Y, i < 7 ? this.act曲リスト.ScoreRankCount[i].ToString() : this.act曲リスト.CrownCount[i - 7].ToString());
}
if (TJAPlayer3.NamePlateConfig.data.Medals[0] >= 0)
tBoardNumberDraw(this.ptBoardNumber[10].X - 10, this.ptBoardNumber[10].Y, TJAPlayer3.NamePlateConfig.data.Medals[0].ToString());
if (act難易度選択画面.bOption[0]) actPlayOption.On進行描画(0);
if (act難易度選択画面.bOption[1]) actPlayOption.On進行描画(1);
@ -1074,7 +1078,7 @@ namespace TJAPlayer3
}
private Point[] ptBoardNumber =
{ new Point(72, 283), new Point(135, 283), new Point(200, 283), new Point(72, 258), new Point(135, 258), new Point(200, 258), new Point(200, 233), new Point(72, 311), new Point(135, 311), new Point(200, 311) };
{ new Point(72, 283), new Point(135, 283), new Point(200, 283), new Point(72, 258), new Point(135, 258), new Point(200, 258), new Point(200, 233), new Point(72, 311), new Point(135, 311), new Point(200, 311), new Point(100, 360) };
public void tBoardNumberDraw(int x, int y, string str)
{

View File

@ -468,6 +468,13 @@ namespace TJAPlayer3
}
}
if (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay)
this.nEarnedMedalsCount[0] = 0;
if (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P)
this.nEarnedMedalsCount[1] = 0;
TJAPlayer3.NamePlateConfig.tEarnCoins(this.nEarnedMedalsCount);
#endregion
base.On活性化();