v.1.0
This commit is contained in:
parent
3868c88ae1
commit
a3705bffc2
47 changed files with 2534 additions and 35 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -63,6 +63,18 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:keggle.png
|
||||
|
||||
#begin line.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:line.png
|
||||
|
||||
#begin logo.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
|
BIN
Bowling/Content/bin/Windows/Content/line.xnb
Normal file
BIN
Bowling/Content/bin/Windows/Content/line.xnb
Normal file
Binary file not shown.
BIN
Bowling/Content/bin/Windows/line.xnb
Normal file
BIN
Bowling/Content/bin/Windows/line.xnb
Normal file
Binary file not shown.
BIN
Bowling/Content/line.png
Normal file
BIN
Bowling/Content/line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
|
@ -9,6 +9,7 @@
|
|||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont.spritefont</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont2.spritefont</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/line.png</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/logo.png</File>
|
||||
</SourceFiles>
|
||||
<DestFiles>
|
||||
|
@ -18,5 +19,6 @@
|
|||
<File xsi:nil="true" />
|
||||
<File xsi:nil="true" />
|
||||
<File xsi:nil="true" />
|
||||
<File xsi:nil="true" />
|
||||
</DestFiles>
|
||||
</SourceFileCollection>
|
|
@ -1,7 +1,8 @@
|
|||
Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Size,Build Seconds
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/arrow.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/arrow.xnb","TextureProcessor","Texture2DContent",365,2725,0,1815462
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/ball.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/ball.xnb","TextureProcessor","Texture2DContent",652,10085,0,0060204
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont.spritefont","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont.xnb","FontDescriptionProcessor","SpriteFontContent",2069,70690,0,1249094
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont2.spritefont","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont2.xnb","FontDescriptionProcessor","SpriteFontContent",2069,136226,0,0442164
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb","TextureProcessor","Texture2DContent",276,4181,0,0052916
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/logo.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/logo.xnb","TextureProcessor","Texture2DContent",28661,504373,0,0264658
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/arrow.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/arrow.xnb","TextureProcessor","Texture2DContent",365,2725,0,1991587
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/ball.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/ball.xnb","TextureProcessor","Texture2DContent",652,10085,0,0067644
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont.spritefont","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont.xnb","FontDescriptionProcessor","SpriteFontContent",2069,70690,0,1546222
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont2.spritefont","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont2.xnb","FontDescriptionProcessor","SpriteFontContent",2069,136226,0,0475374
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb","TextureProcessor","Texture2DContent",276,4181,0,0053606
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/line.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/line.xnb","TextureProcessor","Texture2DContent",39598,224925,0,0162617
|
||||
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/logo.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/logo.xnb","TextureProcessor","Texture2DContent",28661,504373,0,0282225
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont.spritefont</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont2.spritefont</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/line.png</File>
|
||||
<File>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/logo.png</File>
|
||||
</SourceFiles>
|
||||
<DestFiles>
|
||||
|
@ -18,5 +19,6 @@
|
|||
<File xsi:nil="true" />
|
||||
<File xsi:nil="true" />
|
||||
<File xsi:nil="true" />
|
||||
<File xsi:nil="true" />
|
||||
</DestFiles>
|
||||
</SourceFileCollection>
|
42
Bowling/Content/obj/Windows/Content/line.mgcontent
Normal file
42
Bowling/Content/obj/Windows/Content/line.mgcontent
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/line.png</SourceFile>
|
||||
<SourceTime>2022-04-23T21:42:16+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/Content/line.xnb</DestFile>
|
||||
<DestTime>2022-04-23T23:12:17.00168+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
<ProcessorTime>2020-08-10T16:17:54+03:00</ProcessorTime>
|
||||
<Parameters>
|
||||
<Key>ColorKeyColor</Key>
|
||||
<Value>255,0,255,255</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>ColorKeyEnabled</Key>
|
||||
<Value>True</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>GenerateMipmaps</Key>
|
||||
<Value>False</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>PremultiplyAlpha</Key>
|
||||
<Value>True</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>ResizeToPowerOfTwo</Key>
|
||||
<Value>False</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>MakeSquare</Key>
|
||||
<Value>False</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>TextureFormat</Key>
|
||||
<Value>Color</Value>
|
||||
</Parameters>
|
||||
<Dependencies />
|
||||
<BuildAsset />
|
||||
<BuildOutput />
|
||||
</PipelineBuildEvent>
|
|
@ -3,7 +3,7 @@
|
|||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/arrow.png</SourceFile>
|
||||
<SourceTime>2022-04-23T00:23:58+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/arrow.xnb</DestFile>
|
||||
<DestTime>2022-04-23T16:59:29.6382629+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:12:15.2356036+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/ball.png</SourceFile>
|
||||
<SourceTime>2021-05-04T12:20:30+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/ball.xnb</DestFile>
|
||||
<DestTime>2022-04-23T16:59:29.6552207+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:12:15.2505626+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont.spritefont</SourceFile>
|
||||
<SourceTime>2011-04-01T09:42:38+04:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont.xnb</DestFile>
|
||||
<DestTime>2022-04-23T16:59:29.7826428+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:12:15.4045547+03:00</DestTime>
|
||||
<Importer>FontDescriptionImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>FontDescriptionProcessor</Processor>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont2.spritefont</SourceFile>
|
||||
<SourceTime>2022-04-23T14:47:06+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont2.xnb</DestFile>
|
||||
<DestTime>2022-04-23T16:59:29.8289166+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:12:15.4534544+03:00</DestTime>
|
||||
<Importer>FontDescriptionImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>FontDescriptionProcessor</Processor>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</SourceFile>
|
||||
<SourceTime>2022-04-23T00:12:43.2915834+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb</DestFile>
|
||||
<DestTime>2022-04-23T16:59:29.8349009+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:12:15.4604061+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
|
|
42
Bowling/Content/obj/Windows/line.mgcontent
Normal file
42
Bowling/Content/obj/Windows/line.mgcontent
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/line.png</SourceFile>
|
||||
<SourceTime>2022-04-23T21:42:16+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/line.xnb</DestFile>
|
||||
<DestTime>2022-04-23T23:12:15.4773594+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
<ProcessorTime>2020-08-10T16:17:54+03:00</ProcessorTime>
|
||||
<Parameters>
|
||||
<Key>ColorKeyColor</Key>
|
||||
<Value>255,0,255,255</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>ColorKeyEnabled</Key>
|
||||
<Value>True</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>GenerateMipmaps</Key>
|
||||
<Value>False</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>PremultiplyAlpha</Key>
|
||||
<Value>True</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>ResizeToPowerOfTwo</Key>
|
||||
<Value>False</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>MakeSquare</Key>
|
||||
<Value>False</Value>
|
||||
</Parameters>
|
||||
<Parameters>
|
||||
<Key>TextureFormat</Key>
|
||||
<Value>Color</Value>
|
||||
</Parameters>
|
||||
<Dependencies />
|
||||
<BuildAsset />
|
||||
<BuildOutput />
|
||||
</PipelineBuildEvent>
|
|
@ -3,7 +3,7 @@
|
|||
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/logo.png</SourceFile>
|
||||
<SourceTime>2022-04-23T11:30:44.0139383+03:00</SourceTime>
|
||||
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/logo.xnb</DestFile>
|
||||
<DestTime>2022-04-23T16:59:29.8628251+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:12:15.5052868+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
|
|
|
@ -8,6 +8,7 @@ using System.Windows.Forms;
|
|||
using NetLib;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
using System;
|
||||
|
||||
namespace Bowling
|
||||
{
|
||||
|
@ -17,6 +18,7 @@ namespace Bowling
|
|||
}
|
||||
public class Game1 : Game
|
||||
{
|
||||
private Color[] colors = { Color.White, Color.Red, Color.Black, Color.DeepSkyBlue, Color.DeepPink };
|
||||
private GraphicsDeviceManager _graphics;
|
||||
private SpriteBatch _spriteBatch;
|
||||
private static int gutter_height;
|
||||
|
@ -35,6 +37,8 @@ namespace Bowling
|
|||
private List<Classes.UI.Label> tableLabels;
|
||||
private int intermediateScore;
|
||||
private int counter;
|
||||
private Texture2D line_texture;
|
||||
private Random random;
|
||||
|
||||
|
||||
private List<Pin> pins = new List<Pin>();
|
||||
|
@ -62,7 +66,8 @@ namespace Bowling
|
|||
gutter_bottom_y = _graphics.PreferredBackBufferHeight - 100;
|
||||
gutter_height = 50;
|
||||
ballStartPosition = new Vector2(10, gutter_top_y + (gutter_bottom_y - gutter_top_y) / 2 - 25);
|
||||
ball = new Ball(ballStartPosition, Vector2.Zero, Color.Blue, Gutter_top_y, gutter_bottom_y, gutter_height, _graphics.PreferredBackBufferWidth);
|
||||
random = new Random();
|
||||
ball = new Ball(ballStartPosition, Vector2.Zero, colors[random.Next(colors.Length)], Gutter_top_y, gutter_bottom_y, gutter_height, _graphics.PreferredBackBufferWidth);
|
||||
menu = new Menu();
|
||||
player2 = new Player();
|
||||
rowWidth = 80;
|
||||
|
@ -88,7 +93,7 @@ namespace Bowling
|
|||
{
|
||||
for (int j = 0; j < count; j++)
|
||||
{
|
||||
pins.Add(new Pin(keggle_texture, new Vector2(_graphics.PreferredBackBufferWidth - 150 * modifier + i * keggle_texture.Width * modifier, j * keggle_texture.Height * modifier + gutter_top_y - keggle_texture.Height * count / 2 * modifier + keggle_texture.Height * 6 + 30)));
|
||||
pins.Add(new Pin(keggle_texture, new Vector2(_graphics.PreferredBackBufferWidth - 150 * modifier + i * keggle_texture.Width * modifier, j * keggle_texture.Height * modifier + gutter_top_y - keggle_texture.Height * count / 2 * modifier + keggle_texture.Height * 5 + 30)));
|
||||
}
|
||||
count += 1;
|
||||
}
|
||||
|
@ -96,6 +101,7 @@ namespace Bowling
|
|||
whiteRectangle = new Texture2D(GraphicsDevice, 1, 1);
|
||||
whiteRectangle.SetData(new[] { Color.White });
|
||||
menu.LoadContent(Content);
|
||||
line_texture = Content.Load<Texture2D>("line");
|
||||
}
|
||||
|
||||
protected override void Update(GameTime gameTime)
|
||||
|
@ -131,7 +137,6 @@ namespace Bowling
|
|||
if (msg == "11")
|
||||
{
|
||||
ResetAll();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -170,8 +175,9 @@ namespace Bowling
|
|||
{
|
||||
case GameState.Game:
|
||||
DrawGrid();
|
||||
_spriteBatch.Draw(whiteRectangle, new Rectangle(0, gutter_top_y - gutter_height, 10000, gutter_height), Color.Aquamarine);
|
||||
_spriteBatch.Draw(whiteRectangle, new Rectangle(0, gutter_bottom_y, 10000, gutter_height), Color.Aquamarine);
|
||||
_spriteBatch.Draw(whiteRectangle, new Rectangle(0, gutter_top_y - gutter_height, 10000, gutter_height), Color.Gray);
|
||||
_spriteBatch.Draw(whiteRectangle, new Rectangle(0, gutter_bottom_y, 10000, gutter_height), Color.Gray);
|
||||
_spriteBatch.Draw(line_texture, new Rectangle(0, gutter_top_y, _graphics.PreferredBackBufferWidth, gutter_bottom_y - gutter_top_y), Color.White);
|
||||
for (int i = 0; i < pins.Count; i++)
|
||||
{
|
||||
pins[i].Draw(_spriteBatch);
|
||||
|
@ -240,6 +246,9 @@ namespace Bowling
|
|||
private void DrawGrid()
|
||||
{
|
||||
tableLabels.Clear();
|
||||
_spriteBatch.Draw(whiteRectangle, new Rectangle(tableMarginLeft, tableMarginTop, rowWidth * 13, rowHeight * 7), Color.RoyalBlue);
|
||||
_spriteBatch.Draw(whiteRectangle, new Rectangle(tableMarginLeft + rowWidth, tableMarginTop + rowHeight, rowWidth * 12, rowHeight * 6),
|
||||
Color.SkyBlue);
|
||||
int currentRow = 0;
|
||||
int currentColumn = 0;
|
||||
for (int i = 0; i < 6; i++)
|
||||
|
@ -257,11 +266,11 @@ namespace Bowling
|
|||
for (int i = 1; i < 11; i++)
|
||||
{
|
||||
int shift = (i == 10) ? tableMarginLeft - 5 + rowWidth * i + rowWidth : tableMarginLeft - 5 + rowWidth * i + rowWidth / 2;
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(i.ToString(), new Vector2(shift, tableMarginTop + 2), Color.Red);
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(i.ToString(), new Vector2(shift, tableMarginTop + 2), Color.White);
|
||||
lbl.LoadContent(Content);
|
||||
tableLabels.Add(lbl);
|
||||
}
|
||||
Classes.UI.Label label = new Classes.UI.Label("TTL", new Vector2(tableMarginLeft + currentColumn - 2 * rowWidth + 10, tableMarginTop + 5), Color.Red);
|
||||
Classes.UI.Label label = new Classes.UI.Label("TTL", new Vector2(tableMarginLeft + currentColumn - 2 * rowWidth + 10, tableMarginTop + 5), Color.MonoGameOrange);
|
||||
label.LoadContent(Content);
|
||||
tableLabels.Add(label);
|
||||
for (int i = 0; i < player1.Score.Count; i++)
|
||||
|
@ -269,15 +278,15 @@ namespace Bowling
|
|||
string score = (player1.Score[i] == 0) ? "-" : player1.Score[i].ToString();
|
||||
if (i != 0 && i % 2 == 1) score = (player1.Score[i] + player1.Score[i - 1] == 10) ? "/" : score;
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score, new Vector2(tableMarginLeft + rowWidth + i * (rowWidth / 2) + 10, tableMarginTop + rowHeight + 5),
|
||||
Color.Fuchsia);
|
||||
Color.White);
|
||||
lbl.LoadContent(Content);
|
||||
tableLabels.Add(lbl);
|
||||
}
|
||||
for (int i = 0; i < player1.Score.Count / 2; i++)
|
||||
{
|
||||
int score = player1.Score[i * 2] + player1.Score[i * 2 + 1];
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score.ToString(), new Vector2(tableMarginLeft + rowWidth + i * rowWidth + 30, tableMarginTop + 2 * rowHeight + 25)
|
||||
, Color.Fuchsia);
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score.ToString(), new Vector2(tableMarginLeft + rowWidth + i * rowWidth + 30, tableMarginTop + 2 * rowHeight + 25),
|
||||
Color.White);
|
||||
lbl.FontName = "gameFont2";
|
||||
lbl.LoadContent(Content);
|
||||
tableLabels.Add(lbl);
|
||||
|
@ -290,7 +299,7 @@ namespace Bowling
|
|||
else if (i == 1) score = Sum(player1.Score);
|
||||
else score = Sum(player2.Score);
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score.ToString(), new Vector2(tableMarginLeft + rowWidth * 12 + rowWidth / 2 - 15, tableMarginTop + countRows + rowHeight + ((i % 2 == 1) ? 15 : 5)),
|
||||
Color.Fuchsia);
|
||||
Color.White);
|
||||
if (i % 2 == 1) lbl.FontName = "gameFont2";
|
||||
lbl.LoadContent(Content);
|
||||
tableLabels.Add(lbl);
|
||||
|
@ -301,25 +310,26 @@ namespace Bowling
|
|||
string score = (player2.Score[i] == 0) ? "-" : player2.Score[i].ToString();
|
||||
if (i != 0 && i % 2 == 1) score = (player2.Score[i] + player2.Score[i - 1] == 10) ? "/" : score;
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score, new Vector2(tableMarginLeft + rowWidth + i * (rowWidth / 2) + 10, tableMarginTop + rowHeight * 4 + 5),
|
||||
Color.Fuchsia);
|
||||
Color.White);
|
||||
lbl.LoadContent(Content);
|
||||
tableLabels.Add(lbl);
|
||||
}
|
||||
for (int i = 0; i < player2.Score.Count / 2; i++)
|
||||
{
|
||||
int score = player2.Score[i * 2] + player2.Score[i * 2 + 1];
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score.ToString(), new Vector2(tableMarginLeft + rowWidth + i * rowWidth + 30, tableMarginTop + 5 * rowHeight + 25)
|
||||
, Color.Fuchsia);
|
||||
Classes.UI.Label lbl = new Classes.UI.Label(score.ToString(), new Vector2(tableMarginLeft + rowWidth + i * rowWidth + 30, tableMarginTop + 5 * rowHeight + 25),
|
||||
Color.White);
|
||||
lbl.FontName = "gameFont2";
|
||||
lbl.LoadContent(Content);
|
||||
tableLabels.Add(lbl);
|
||||
}
|
||||
Classes.UI.Label label_p1_name = new Classes.UI.Label(player1.Name[0].ToString(), new Vector2(tableMarginLeft + 2, tableMarginTop + rowHeight),
|
||||
Color.Red);
|
||||
Classes.UI.Label label_p1_name = new Classes.UI.Label(player1.Name[0].ToString(), new Vector2(tableMarginLeft + 5, tableMarginTop + rowHeight),
|
||||
Color.White);
|
||||
label_p1_name.LoadContent(Content);
|
||||
tableLabels.Add(label_p1_name);
|
||||
|
||||
Classes.UI.Label label_p2_name = new Classes.UI.Label(player2.Name[0].ToString(), new Vector2(tableMarginLeft + 2, tableMarginTop + 4 * rowHeight), Color.Red);
|
||||
Classes.UI.Label label_p2_name = new Classes.UI.Label(player2.Name[0].ToString(), new Vector2(tableMarginLeft + 5, tableMarginTop + 4 * rowHeight),
|
||||
Color.White);
|
||||
label_p2_name.LoadContent(Content);
|
||||
tableLabels.Add(label_p2_name);
|
||||
}
|
||||
|
@ -333,14 +343,10 @@ namespace Bowling
|
|||
private int Sum(List<int> score)
|
||||
{
|
||||
int sum = 0;
|
||||
try
|
||||
for (int i = 0; i < score.Count; i++)
|
||||
{
|
||||
foreach (int a in score)
|
||||
{
|
||||
sum += a;
|
||||
sum += score[i];
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
2370
Bowling/bin/Debug/netcoreapp3.1/Bowling.deps.json
Normal file
2370
Bowling/bin/Debug/netcoreapp3.1/Bowling.deps.json
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Bowling.pdb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Bowling.pdb
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"runtimeOptions": {
|
||||
"additionalProbingPaths": [
|
||||
"C:\\Users\\Semejkin_AV\\.dotnet\\store\\|arch|\\|tfm|",
|
||||
"C:\\Users\\Semejkin_AV\\.nuget\\packages"
|
||||
]
|
||||
}
|
||||
}
|
12
Bowling/bin/Debug/netcoreapp3.1/Bowling.runtimeconfig.json
Normal file
12
Bowling/bin/Debug/netcoreapp3.1/Bowling.runtimeconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "netcoreapp3.1",
|
||||
"framework": {
|
||||
"name": "Microsoft.WindowsDesktop.App",
|
||||
"version": "3.1.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.TieredCompilation": false
|
||||
}
|
||||
}
|
||||
}
|
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/arrow.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/arrow.xnb
Normal file
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/ball.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/ball.xnb
Normal file
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/gameFont.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/gameFont.xnb
Normal file
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/gameFont2.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/gameFont2.xnb
Normal file
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/keggle.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/keggle.xnb
Normal file
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/line.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/line.xnb
Normal file
Binary file not shown.
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/logo.xnb
Normal file
BIN
Bowling/bin/Debug/netcoreapp3.1/Content/logo.xnb
Normal file
Binary file not shown.
Binary file not shown.
|
@ -93,3 +93,4 @@ C:\Users\Semejkin_AV\Documents\Github_repos\ProgtimeHack2022_Bowling\Bowling\obj
|
|||
C:\Users\Semejkin_AV\Documents\Github_repos\ProgtimeHack2022_Bowling\Bowling\obj\Debug\netcoreapp3.1\Bowling.pdb
|
||||
C:\Users\Semejkin_AV\Documents\Github_repos\ProgtimeHack2022_Bowling\Bowling\obj\Debug\netcoreapp3.1\Bowling.genruntimeconfig.cache
|
||||
C:\Users\Semejkin_AV\Documents\Github_repos\ProgtimeHack2022_Bowling\Bowling\bin\Debug\netcoreapp3.1\Content\gameFont2.xnb
|
||||
C:\Users\Semejkin_AV\Documents\Github_repos\ProgtimeHack2022_Bowling\Bowling\bin\Debug\netcoreapp3.1\Content\line.xnb
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
a432b769b6058693c28edb96b2adee2d4f085082
|
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue