diff --git a/src/Arts.cs b/src/Arts.cs index 3730281..25fe444 100644 --- a/src/Arts.cs +++ b/src/Arts.cs @@ -100,9 +100,4 @@ static class Arts Hierarchy.Pop(); } - - public static void Step() - { - - } } \ No newline at end of file diff --git a/src/Mono.cs b/src/Mono.cs index 59b5982..ab48d0c 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -6,9 +6,6 @@ namespace slash; static class Mono { public static double game_time = 0.0; - public static double step_step = 60.0 / 80; // 80|100|120 bpm - public static double step_time = 0.0; - public static double step_t = 0.0; public static double intro_skip = 0.0; public static bool intro = true; // press to move until x condition or hold to skip @@ -52,7 +49,6 @@ static class Mono Hold = 0, Mount = 1, } - // start mounted & in_cone public static BoxMode box_mode = BoxMode.Mount; public static DeltaBool in_cone = new(true); public static DeltaBool in_dist = new(false); @@ -138,102 +134,6 @@ static class Mono } } - public static void Step() - { - // eat tail - if (slash[0] + slash_dir == slash[slash_len - 1]) - { - slash_len--; - grow_buffer = 0; - } - else if (s_array[slash[0] + slash_dir] > -1) - { - // lose condition - bool stuck = true; - for (int i = 0; i < directions.Length; i++) - { - if (s_array[slash[0] + directions[i]] == -1) - { - stuck = false; - } - } - if (stuck) - { - Log.Info("your stuck"); - } - return; - } - - bool in_or_around_box = s_array.InRange(slash[0] + slash_dir); - if (!in_or_around_box) - { - return; - } - - if (eaten_latch.delta != +1) - { - if (slash_len == slash.Length) - { - // win condition - Log.Info("full slash"); - return; - } - else - { - if (grow_buffer > 0) - { - slash_len++; - grow_buffer--; - } - } - - // slither - for (int i = slash.Length - 1; i > 0; i--) - { - slash[i] = slash[i - 1]; - } - slash[0] += slash_dir; - } - - in_box.Step(box_space.InRange(slash[0])); - if (in_box.delta != 0) // 1 just in -1 just out - { - holes.Add(slash[0], slash_dir); - SFX.punch_through.PlayBox(slash[0]); - Arts.shake += slash_dir.ToVec3; - } - if (holes.ContainsKey(slash[slash_len - 1])) - { - holes.Remove(slash[slash_len - 1]); - } - - update_s_array(); - - // eat - if (!eaten_latch.state) - { - eaten_latch.Step(food == slash[0]); - if (eaten_latch.delta == +1) - { - eat_timestamp = Time.Total; - grow_buffer += 3; - eaten++; - - VFX.Play(slash[0]); - SFX.crisp_nom.PlayBox(slash[0]); - } - } - else - { - (bool viable, XYZi cell) = Feed(); - eaten_latch.Step(!viable); - if (eaten_latch.delta == -1) - { - food = cell; - } - } - } - static (bool, XYZi) Feed() { // [!] handle out of the box exception on tail diff --git a/src/Program.cs b/src/Program.cs index b436ba6..410c409 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -52,52 +52,6 @@ class Program if (!Mono.menu) { Mono.game_time += Time.Step; - if (Mono.intro) - { - Mono.step_time = Maths.min(Mono.step_time + Time.Step, Mono.step_step); - Mono.step_t = Maths.u_clamp(Maths.min(Mono.step_time, Mono.step_step) / Mono.step_step); - if (Rig.btn_select.delta == +1) - { - Mono.step_time = 0.0; - Mono.step_t = 0.0; - - Mono.Step(); - Arts.Step(); - - if (Mono.eaten > 0) - { - Mono.intro = false; - } - } - - if (Rig.btn_select.state) - { - Mono.intro_skip += Time.Step; - if (Mono.intro_skip >= 1.0) - { - Mono.intro = false; - } - } - - if (Rig.btn_select.delta == -1) - { - Mono.intro_skip = 0.0; - } - } - else - { - Mono.step_time = Maths.min(Mono.step_time + Time.Step, Mono.step_step); - Mono.step_t = Maths.u_clamp(Maths.min(Mono.step_time, Mono.step_step) / Mono.step_step); - if (Mono.step_time >= Mono.step_step) - { - Mono.step_time -= Mono.step_step; - Mono.step_t = 0.0; - - - Mono.Step(); - Arts.Step(); - } - } VFX.Frame(); }