-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstants.cs
146 lines (118 loc) · 5.21 KB
/
Constants.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
using System.Collections.Generic;
using Unit06.Game.Casting;
namespace Unit06
{
public class Constants
{
// -----------------------------------------------------------------------------------------
// GENERAL GAME CONSTANTS
// -----------------------------------------------------------------------------------------
// GAME
public static string GAME_NAME = "Batter";
public static int FRAME_RATE = 60;
// SCREEN
public static int SCREEN_WIDTH = 1040;
public static int SCREEN_HEIGHT = 860;
public static int CENTER_X = SCREEN_WIDTH / 2;
public static int CENTER_Y = SCREEN_HEIGHT / 2;
// FIELD
public static int FIELD_TOP = 60;
public static int FIELD_BOTTOM = SCREEN_HEIGHT;
public static int FIELD_LEFT = 0;
public static int FIELD_RIGHT = SCREEN_WIDTH;
// FONT
public static string FONT_FILE = "Assets/Fonts/zorque.otf";
public static int FONT_SIZE = 32;
// SOUND
public static string BOUNCE_SOUND = "Assets/Sounds/boing.wav";
public static string WELCOME_SOUND = "Assets/Sounds/start.wav";
public static string OVER_SOUND = "Assets/Sounds/over.wav";
// TEXT
public static int ALIGN_LEFT = 0;
public static int ALIGN_CENTER = 1;
public static int ALIGN_RIGHT = 2;
// COLORS
public static Color BLACK = new Color(0, 0, 0);
public static Color WHITE = new Color(255, 255, 255);
public static Color PURPLE = new Color(255, 0, 255);
// KEYS
public static string LEFT = "left";
public static string RIGHT = "right";
public static string UP = "up";
public static string DOWN = "down";
public static string SPACE = "space";
public static string W = "W";
public static string ENTER = "enter";
public static string PAUSE = "p";
// SCENES
public static string NEW_GAME = "new_game";
public static string TRY_AGAIN = "try_again";
public static string NEXT_LEVEL = "next_level";
public static string IN_PLAY = "in_play";
public static string GAME_OVER = "game_over";
// LEVELS
public static string LEVEL_FILE = "Assets/Data/level-{0:000}.txt";
public static int BASE_LEVELS = 5;
// -----------------------------------------------------------------------------------------
// SCRIPTING CONSTANTS
// -----------------------------------------------------------------------------------------
// PHASES
public static string INITIALIZE = "initialize";
public static string LOAD = "load";
public static string INPUT = "input";
public static string UPDATE = "update";
public static string OUTPUT = "output";
public static string UNLOAD = "unload";
public static string RELEASE = "release";
// -----------------------------------------------------------------------------------------
// CASTING CONSTANTS
// -----------------------------------------------------------------------------------------
// STATS
public static string STATS_GROUP = "stats";
public static int DEFAULT_LIVES = 3;
public static int MAXIMUM_LIVES = 5;
// HUD
public static int HUD_MARGIN = 15;
public static string LEVEL_GROUP = "level";
public static string LIVES_GROUP = "lives";
public static string SCORE_GROUP = "score";
public static string LEVEL_FORMAT = "LEVEL: {0}";
public static string LIVES_FORMAT = "LIVES: {0}";
public static string SCORE_FORMAT = "SCORE: {0}";
// BALL
public static string BALL_GROUP = "balls";
public static string BALL_IMAGE = "Assets/Images/RedFireball.png";
public static int BALL_WIDTH = 28;
public static int BALL_HEIGHT = 28;
public static int BALL_VELOCITY = 20;
// RACKET
public static string RACKET_GROUP = "rackets";
public static List<string> RACKET_IMAGES
= new List<string>() {
"Assets/Images/RedShip.png"
};
public static int RACKET_WIDTH = 106;
public static int RACKET_HEIGHT = 28;
public static int RACKET_RATE = 6;
public static int RACKET_VELOCITY = 7;
// BRICK
public static string BRICK_GROUP = "bricks";
public static Dictionary<string, List<string>> BRICK_IMAGES
= new Dictionary<string, List<string>>() {
{ "b", new List<string>() {
"Assets/Images/GreenShip.png",
} },
};
public static int BRICK_WIDTH = 150;
public static int BRICK_HEIGHT = 60;
public static double BRICK_DELAY = 0.5;
public static int BRICK_RATE = 4;
public static int BRICK_POINTS = 50;
public static int BRICK_VELOCITY = 1;
// DIALOG
public static string DIALOG_GROUP = "dialogs";
public static string ENTER_TO_START = "PRESS ENTER TO START";
public static string PREP_TO_LAUNCH = "PREPARING TO LAUNCH";
public static string WAS_GOOD_GAME = "GAME OVER";
}
}