forked from cfrantzidis/DungeonExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
75 lines (60 loc) · 2.34 KB
/
Copy pathProgram.cs
File metadata and controls
75 lines (60 loc) · 2.34 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Windows.Forms;
using static DungeonExplorer.MainGameHandling;
namespace DungeonExplorer
{
internal class Program
{
private static FormEvents form1 = new FormEvents();
static void Main()
{
bool[] challenges = { false, false };
form1.InitializeComponent();
Application.Run(form1);
}
}
public class LogicToDisplay
{
private static LogicToDisplay instance = null;
private static readonly object padlock = new object();
FormEvents form1 = new FormEvents();
public string DescriptionString;
LogicToDisplay()
{ }
public static LogicToDisplay Instance
{
get
{
lock (padlock)
{
if (instance == null)
{
instance = new LogicToDisplay();
}
}
return instance;
}
}
//dynamic text for popups for different states
public Dictionary<GridButton_States, string> sits = new Dictionary<GridButton_States, string>
{
{GridButton_States.Navigation, "\nAction2 = North \nAction4 = West \nAction5 = Rest \nAction6 = East \nAction8 = South" },
{GridButton_States.Misc, "\nAction1 = Interact \nAction3 = Don't Interact"},
{GridButton_States.Inventory, "\nAction1 = Inv Slot 1 \nAction2 = Inv Slot 2 \nAction3 = Inv Slot 3 \nAction4 = Inv Slot 4 \nAction5 = Exit \nAction6 = Inv Slot 5 \nAction7 = Inv Slot 6 \nAction8 = Inv Slot 7 \nAction9 = Inv Slot 8" },
{GridButton_States.InvItem, "\nAction1 = Use \nAction2 = Back \nAction3 = Drop"}
//combat will be added later
};
//debug
public void SwitchStates(GridButton_States State)
{
}
//dynamic popup content
public void LabelText(string text)
{
MessageBox.Show(Player.Instance.Stored_MapGrid[Player.Instance.Pos_x][Player.Instance.Pos_y].ImagePath+ "\n" + Player.Instance.DescriptionString + sits[Player.Instance. CurrentState] + $"\nHealth: {Player.Instance.Health} \nEnergy: {Player.Instance.Energy}");
}
}
}