-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameContent.cs
49 lines (42 loc) · 1.75 KB
/
GameContent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Media;
namespace AsteroidGame
{
class GameContent
{
public Texture2D BrickTexture { get; set; }
public Texture2D Ball { get; set; }
public Texture2D Paddle { get; set; }
public Texture2D Pixel { get; set; }
public SoundEffect BallMiss { get; set; }
public SoundEffect PaddleHit { get; set; }
public SoundEffect Wallhit { get; set; }
public SoundEffect BrickHit { get; set; }
public SoundEffect BallLaunch { get; set; }
public SpriteFont Helvetica;
public GameContent(ContentManager Content)
{
//This loads the Textures we imported from the pipeline tool
Paddle = Content.Load<Texture2D>("Paddle");
Ball = Content.Load<Texture2D>("Ball");
Pixel = Content.Load<Texture2D>("pixel");
BrickTexture = Content.Load<Texture2D>("Brick (1)");
////This loads the Sounds we imported from the pipeline tool
BrickHit = Content.Load<SoundEffect>("BrickBreak");
BallMiss = Content.Load<SoundEffect>("BallMiss");
PaddleHit = Content.Load<SoundEffect>("PaddleBounce");
Wallhit = Content.Load<SoundEffect>("WallBounce");
BallLaunch = Content.Load<SoundEffect>("LaunchBall");
// This loads the Font
Helvetica = Content.Load<SpriteFont>("Helvetica");
}
}
}