2024-03-22 17:03:01 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2024-03-29 14:18:38 +08:00
|
|
|
|
using System.Globalization;
|
2024-03-22 17:03:01 +08:00
|
|
|
|
using System.Linq;
|
2024-03-29 14:18:38 +08:00
|
|
|
|
using System.Resources;
|
2024-03-22 17:03:01 +08:00
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Board_funcs;
|
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Forms;
|
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Properties;
|
2024-03-29 14:18:38 +08:00
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Sound;
|
2024-03-22 17:03:01 +08:00
|
|
|
|
namespace CDSAE3_Lian_Lian_Kan
|
|
|
|
|
{
|
2024-04-02 21:57:04 +08:00
|
|
|
|
public static class Etcs
|
2024-03-22 17:03:01 +08:00
|
|
|
|
{
|
|
|
|
|
public static int left_time { get; set; } = 180;
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static int search_left_time { get; set; } = 20;
|
|
|
|
|
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public enum Difficulty
|
|
|
|
|
{
|
|
|
|
|
easy = 0,
|
|
|
|
|
normal = 1,
|
|
|
|
|
hard = 2,
|
|
|
|
|
custom = 3
|
|
|
|
|
}
|
|
|
|
|
public enum Mode
|
|
|
|
|
{
|
|
|
|
|
fruit = 0
|
|
|
|
|
}
|
|
|
|
|
public enum Direction
|
|
|
|
|
{
|
|
|
|
|
none = 0,
|
|
|
|
|
up = 1,
|
|
|
|
|
right = 2,
|
|
|
|
|
down = 4,
|
|
|
|
|
left = 8,
|
|
|
|
|
up_down = 5,
|
|
|
|
|
left_right = 10,
|
|
|
|
|
up_right = 3,
|
|
|
|
|
up_left = 9,
|
|
|
|
|
down_right = 6,
|
2024-03-29 14:18:38 +08:00
|
|
|
|
down_left = 12,
|
|
|
|
|
up_down_right = 7,
|
|
|
|
|
up_down_left = 13,
|
|
|
|
|
up_left_right = 11,
|
|
|
|
|
down_left_right = 14,
|
|
|
|
|
up_down_left_right = 15
|
2024-03-22 17:03:01 +08:00
|
|
|
|
}
|
2024-04-02 21:57:04 +08:00
|
|
|
|
public enum break_music
|
|
|
|
|
{
|
|
|
|
|
breakA,
|
|
|
|
|
breakB
|
|
|
|
|
}
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public static Dictionary<int, double> decrease_per_level = new Dictionary<int, double> {
|
|
|
|
|
{1,100.0/60 },
|
|
|
|
|
{2,100.0/45 },
|
|
|
|
|
{3,100.0/35 },
|
|
|
|
|
{4,100.0/30 },
|
|
|
|
|
{5,100.0/25 },
|
|
|
|
|
{6,100.0/20 },
|
|
|
|
|
{7,100.0/15 },
|
|
|
|
|
{8,100.0/10 },
|
|
|
|
|
{9,100.0/5 },
|
|
|
|
|
{10,100.0/3 }};
|
|
|
|
|
|
|
|
|
|
static int cus_height = 1, cus_width = 1;
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static Difficulty current_difficulty { get; set; } = Difficulty.normal;
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public static Mode current_mode { get; set; }
|
|
|
|
|
public static Image trans_Image { get; set; } = Resources.trans;
|
|
|
|
|
public static (int, int) get_length_width() => current_difficulty != Difficulty.custom ? (7 * (1 + (int)current_difficulty), 4 * (1 + (int)current_difficulty)) : (cus_width,cus_height);
|
|
|
|
|
public static List<Image> block_Images { get; set; } = new List<Image> { Resources.Apple, Resources.Banana, Resources.Beetroot, Resources.Cherry, Resources.Corn, Resources.Eggplant, Resources.Grape, Resources.Pear, Resources.Strawberry, Resources.Watermelon };
|
|
|
|
|
public static List<Image> disappear_Images { get; set; } = new List<Image> { Resources.Gapple, Resources.Gbanana, Resources.Gbeetroot, Resources.Gcherry, Resources.Gcorn, Resources.Geggplant, Resources.Ggrape, Resources.Gpear, Resources.Gstrawberry, Resources.Gwatermelon };
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static List<Image> direction_Images { get; set; } = new List<Image> { Resources.trans, Resources.u, Resources.r , Resources.ur, Resources.d, Resources.ud, Resources.dr, Resources.udr, Resources.l, Resources.ul, Resources.lr, Resources.ulr, Resources.dl, Resources.udl, Resources.dlr, Resources.udlr};
|
|
|
|
|
public static List<Image> tip_direction_Image { get; set; } = new List<Image> { Resources.trans, Resources.tip_u, Resources.tip_r, Resources.tip_ur, Resources.tip_d, Resources.tip_ud, Resources.tip_dr, Resources.tip_udr, Resources.tip_l, Resources.tip_ul, Resources.tip_lr, Resources.tip_ulr, Resources.tip_dl, Resources.tip_udl, Resources.tip_dlr, Resources.tip_udlr };
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public static Image get_block_Image(int t) => block_Images[t];
|
|
|
|
|
public static Image get_disappear_Images(int t) => disappear_Images[t];
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static Image get_direction_Image(Direction direction) => direction_Images[(int)direction];
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public static int Images_size() => current_mode switch { Mode.fruit => 10, _ => 0, };
|
2024-03-29 14:18:38 +08:00
|
|
|
|
internal static Image get_tip_direction_Image(Direction direction) => tip_direction_Image[(int)direction];
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public static LianLianKan? form { get; set; }
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static IGameControl? game_form{ get; set; }//gameBoard
|
2024-03-22 17:03:01 +08:00
|
|
|
|
public static IGameMode? game_mode_form { get; set; }//entireGame
|
|
|
|
|
public static Board board { get; set; } = new Board();
|
|
|
|
|
public static Color def_Color { get; set; } = Color.FromArgb(0, 0, 0, 0);
|
|
|
|
|
public static Color sel_Color { get; set; } = Color.FromArgb(0, 122, 204);
|
2024-04-02 21:57:04 +08:00
|
|
|
|
public static Color mouse_upper_color { get; set; } = Color.FromArgb(97, 97, 108);
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static Dictionary<string, List<string>> musics { get; set; } = new Dictionary<string, List<string>> { { "C418", new List<string> { "C418 - Beginning 2", "C418 - Floating Trees", "C418 - Moog City 2", "C418 - Mutation" } } };
|
2024-04-02 21:57:04 +08:00
|
|
|
|
public static Song_Audio_processer song_Audio_Processer { get; set; } = new Song_Audio_processer();
|
|
|
|
|
public static Info_Audio_processer info_Audio_Processer { get; set; } = new Info_Audio_processer();
|
2024-03-29 14:18:38 +08:00
|
|
|
|
public static ResourceManager res_Manager { get; set; } = new ResourceManager("CDSAE3_Lian_Lian_Kan.Properties.Resources", typeof(Resources).Assembly);
|
|
|
|
|
public static CultureInfo res_Culture { get; set; } = new CultureInfo("en-US");
|
2024-04-02 21:57:04 +08:00
|
|
|
|
public static int Song_Volume { get; set; } = 70;
|
|
|
|
|
public static int Info_Volume { get; set; } = 70;
|
|
|
|
|
|
2024-03-22 17:03:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|