-
Notifications
You must be signed in to change notification settings - Fork 0
/
Key.cs
47 lines (42 loc) · 1.13 KB
/
Key.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
/*Programmer: Katy Mollenkopf
* ---------------------------- */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework.Graphics;
namespace Vault_Prisoner
{
class Key : Situation
{
private Texture2D image;
private Random rng;
public Key(Texture2D image, Random rng)
: base(image, rng)
{
type = "key";
this.image = image;
this.rng = rng;
status = "";
}
protected override void SetDefaultValues()
{
header = "Key";
body = "You've found a key!\nNice work!";
action = "";
reaction = "";
conclusion = "Keys in inventory: ";
}
public override void Activate(Player player, Gui gui)
{
SetDefaultValues();
menu = gui.allMenus["key"];
if (menu != null)
{
player.keys++;
conclusion += player.keys + "/2";
}
}
}
}