Skip to content

Commit 0b0cc94

Browse files
committed
Merge branch 'feature' into develop
2 parents 0d02cff + 5c025d2 commit 0b0cc94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+103946
-2538
lines changed
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.

CYPVP/.vs/CYPVP/v17/.suo

10.5 KB
Binary file not shown.

CYPVP/CYPVP.csproj

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@
4848
<ItemGroup>
4949
<Compile Include="AudioManager.cs" />
5050
<Compile Include="Character.cs" />
51+
<Compile Include="EndGame.cs">
52+
<SubType>Form</SubType>
53+
</Compile>
54+
<Compile Include="EndGame.Designer.cs">
55+
<DependentUpon>EndGame.cs</DependentUpon>
56+
</Compile>
5157
<Compile Include="Form1.cs">
5258
<SubType>Form</SubType>
5359
</Compile>
@@ -72,6 +78,10 @@
7278
<Compile Include="Program.cs" />
7379
<Compile Include="Properties\AssemblyInfo.cs" />
7480
<Compile Include="Slime.cs" />
81+
<Compile Include="Star.cs" />
82+
<EmbeddedResource Include="EndGame.resx">
83+
<DependentUpon>EndGame.cs</DependentUpon>
84+
</EmbeddedResource>
7585
<EmbeddedResource Include="Form1.resx">
7686
<DependentUpon>Form1.cs</DependentUpon>
7787
</EmbeddedResource>
@@ -227,5 +237,23 @@
227237
<ItemGroup>
228238
<None Include="Resources\5_statusbar.png" />
229239
</ItemGroup>
240+
<ItemGroup>
241+
<None Include="Resources\Btn01.png" />
242+
</ItemGroup>
243+
<ItemGroup>
244+
<None Include="Resources\star_preview_rev_1.png" />
245+
</ItemGroup>
246+
<ItemGroup>
247+
<None Include="Resources\coin_collect.wav" />
248+
</ItemGroup>
249+
<ItemGroup>
250+
<None Include="Resources\oscillating-space-waves-31400.wav" />
251+
</ItemGroup>
252+
<ItemGroup>
253+
<None Include="Resources\Epic Fail Sound Effect.wav" />
254+
</ItemGroup>
255+
<ItemGroup>
256+
<None Include="Resources\Yayyy Sound Effect.wav" />
257+
</ItemGroup>
230258
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
231259
</Project>

CYPVP/Character.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void Move(String Position,int Speed,int Height,int Width,int x,int y)
2828
if (Position == "UP")
2929
{
3030
int NewPosition = CharacterSkin.Location.Y - Speed;
31-
if (NewPosition >= 40)
31+
if (NewPosition >= 80)
3232
{
3333

3434

CYPVP/EndGame.Designer.cs

Lines changed: 158 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CYPVP/EndGame.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Data;
5+
using System.Drawing;
6+
using System.Linq;
7+
using System.Media;
8+
using System.Text;
9+
using System.Threading.Tasks;
10+
using System.Windows.Forms;
11+
12+
namespace CYPVP
13+
{
14+
public partial class EndGame : Form
15+
{
16+
public int Points { get; set; }
17+
public SoundPlayer soundPlayer { get; set; }
18+
public EndGame(int points)
19+
{
20+
InitializeComponent();
21+
Points = points;
22+
lb_Points.Text = Points.ToString();
23+
if (GetGrade() == 10)
24+
{
25+
lb_Grade.Text = "10";
26+
}else if(GetGrade() == 4)
27+
{
28+
lb_Grade.Text = "5";
29+
}
30+
else
31+
{
32+
lb_Grade.Text = $"{GetGrade() + 1}";
33+
}
34+
if (GetGrade() > 5)
35+
{
36+
label3.Text = "Yeyy you passed Visual Programming";
37+
soundPlayer = new SoundPlayer(Properties.Resources.Yayyy_Sound_Effect);
38+
soundPlayer.Play();
39+
}
40+
else
41+
{
42+
soundPlayer = new SoundPlayer(Properties.Resources.Epic_Fail_Sound_Effect);
43+
soundPlayer.Play();
44+
}
45+
}
46+
47+
public int GetGrade()
48+
{
49+
if ((int)(Points / 10) < 5) return 4;
50+
if ((int)(Points / 10) >= 10) return 10;
51+
return (int)(Points / 10);
52+
}
53+
54+
private void EndGame_Load(object sender, EventArgs e)
55+
{
56+
57+
}
58+
59+
60+
61+
private void button2_Click(object sender, EventArgs e)
62+
{
63+
this.Close();
64+
Application.OpenForms["CYPVP"].Show();
65+
CYPVP.Menu.Play();
66+
}
67+
}
68+
}

0 commit comments

Comments
 (0)