add endday
This commit is contained in:
@@ -6,11 +6,11 @@ public partial class CurrentTimeLine : Panel
|
|||||||
[Export]
|
[Export]
|
||||||
public float Speed = 15f;
|
public float Speed = 15f;
|
||||||
|
|
||||||
public bool Running { get; private set; }
|
private bool _running;
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
if (!Running)
|
if (!_running)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var pos = OffsetTransformPosition;
|
var pos = OffsetTransformPosition;
|
||||||
@@ -21,6 +21,12 @@ public partial class CurrentTimeLine : Panel
|
|||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
Running = true;
|
_running = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
_running = false;
|
||||||
|
OffsetTransformPosition = Vector2.Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,14 @@ public partial class DaySchedule : PanelContainer
|
|||||||
|
|
||||||
private void OnNewMeetingStarts()
|
private void OnNewMeetingStarts()
|
||||||
{
|
{
|
||||||
|
if (_currentSlot >= GetTimeSlots().Count)
|
||||||
|
{
|
||||||
|
EndDay();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GetTimeSlots()[_currentSlot].StartMeeting();
|
GetTimeSlots()[_currentSlot].StartMeeting();
|
||||||
|
|
||||||
_currentSlot += 1;
|
_currentSlot += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +54,13 @@ public partial class DaySchedule : PanelContainer
|
|||||||
_currentSlot += 1;
|
_currentSlot += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void EndDay()
|
||||||
|
{
|
||||||
|
GD.Print("The DAY was EXECUTED!");
|
||||||
|
ProgressTimer.Stop();
|
||||||
|
CurrentTimeLine.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
private List<TimeSlot> GetTimeSlots()
|
private List<TimeSlot> GetTimeSlots()
|
||||||
{
|
{
|
||||||
return [.. TimeSlotContainer.GetChildren().OfType<TimeSlot>()];
|
return [.. TimeSlotContainer.GetChildren().OfType<TimeSlot>()];
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://covomnw8s7k1n"]
|
[gd_scene format=3 uid="uid://covomnw8s7k1n"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://xv51uvc4koyc" path="res://DaySchedule.cs" id="1_b6clr"]
|
[ext_resource type="Script" uid="uid://xv51uvc4koyc" path="res://DaySchedule.cs" id="1_b6clr"]
|
||||||
[ext_resource type="PackedScene" uid="uid://nnr6u0igggve" path="res://TimeSlot.tscn" id="2_ascl5"]
|
|
||||||
[ext_resource type="Script" uid="uid://cbbrups0mkp17" path="res://CurrentTimeLine.cs" id="3_dtij7"]
|
[ext_resource type="Script" uid="uid://cbbrups0mkp17" path="res://CurrentTimeLine.cs" id="3_dtij7"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cm0pq"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cm0pq"]
|
||||||
@@ -21,17 +20,8 @@ color = Color(1, 0, 0, 1)
|
|||||||
thickness = 5
|
thickness = 5
|
||||||
|
|
||||||
[node name="DaySchedule" type="PanelContainer" unique_id=457829015]
|
[node name="DaySchedule" type="PanelContainer" unique_id=457829015]
|
||||||
anchors_preset = 8
|
offset_right = 214.0
|
||||||
anchor_left = 0.5
|
offset_bottom = 13.0
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
offset_left = -107.0
|
|
||||||
offset_top = -227.0
|
|
||||||
offset_right = 107.0
|
|
||||||
offset_bottom = 227.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_cm0pq")
|
theme_override_styles/panel = SubResource("StyleBoxFlat_cm0pq")
|
||||||
script = ExtResource("1_b6clr")
|
script = ExtResource("1_b6clr")
|
||||||
@@ -48,38 +38,6 @@ mouse_filter = 2
|
|||||||
theme_override_constants/separation = 2
|
theme_override_constants/separation = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="TimeSlot" parent="TimeSlotContainer" unique_id=979842204 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot2" parent="TimeSlotContainer" unique_id=2109237451 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot3" parent="TimeSlotContainer" unique_id=819921714 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot4" parent="TimeSlotContainer" unique_id=1554222465 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot5" parent="TimeSlotContainer" unique_id=1612666058 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot6" parent="TimeSlotContainer" unique_id=1912431362 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot7" parent="TimeSlotContainer" unique_id=1182001581 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot8" parent="TimeSlotContainer" unique_id=193012813 instance=ExtResource("2_ascl5")]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot9" parent="TimeSlotContainer" unique_id=886153912 instance=ExtResource("2_ascl5")]
|
|
||||||
visible = false
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="TimeSlot10" parent="TimeSlotContainer" unique_id=1760034209 instance=ExtResource("2_ascl5")]
|
|
||||||
visible = false
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="CurrentTimeLine" type="Panel" parent="." unique_id=961292687]
|
[node name="CurrentTimeLine" type="Panel" parent="." unique_id=961292687]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
z_index = 2
|
z_index = 2
|
||||||
|
|||||||
@@ -71,10 +71,11 @@ offset_right = 0.0
|
|||||||
|
|
||||||
[node name="DaySchedule" parent="." unique_id=457829015 instance=ExtResource("3_yx171")]
|
[node name="DaySchedule" parent="." unique_id=457829015 instance=ExtResource("3_yx171")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
offset_left = -493.0
|
offset_left = -498.0
|
||||||
offset_top = -277.00006
|
offset_top = -269.0
|
||||||
offset_right = -279.0
|
offset_right = -284.0
|
||||||
offset_bottom = 176.99994
|
offset_bottom = -256.0
|
||||||
|
_hoursInDay = 2
|
||||||
|
|
||||||
[node name="ExecuteButton" type="Button" parent="." unique_id=312490567]
|
[node name="ExecuteButton" type="Button" parent="." unique_id=312490567]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[gd_resource type="Resource" script_class="MeetingResource" format=3 uid="uid://du72uxjqr0h4a"]
|
[gd_resource type="Resource" script_class="MeetingResource" format=3 uid="uid://du72uxjqr0h4a"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://resources/MeetingResource.cs" id="1_4yd4m"]
|
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://resources/MeetingResource.cs" id="1_4yd4m"]
|
||||||
|
[ext_resource type="Script" uid="uid://chl0yv2tsg2va" path="res://resources/MeetingActionResource.cs" id="1_edffo"]
|
||||||
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://resources/GainHypeAction.cs" id="1_qpv0b"]
|
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://resources/GainHypeAction.cs" id="1_qpv0b"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7t1gw"]
|
[sub_resource type="Resource" id="Resource_7t1gw"]
|
||||||
@@ -10,8 +11,7 @@ metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_4yd4m")
|
script = ExtResource("1_4yd4m")
|
||||||
OnMeetingStartActions = Array[Object]([SubResource("Resource_7t1gw")])
|
OnMeetingStartActions = Array[ExtResource("1_edffo")]([SubResource("Resource_7t1gw")])
|
||||||
OnMeetingEndActions = null
|
|
||||||
Title = "LOCK IN"
|
Title = "LOCK IN"
|
||||||
Color = Color(0.73206806, 0.22440341, 0.33911285, 1)
|
Color = Color(0.73206806, 0.22440341, 0.33911285, 1)
|
||||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[gd_resource type="Resource" script_class="MeetingResource" format=3 uid="uid://bcd4qf4i84pwf"]
|
[gd_resource type="Resource" script_class="MeetingResource" format=3 uid="uid://bcd4qf4i84pwf"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://resources/GainHypeAction.cs" id="1_7t1gw"]
|
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://resources/GainHypeAction.cs" id="1_7t1gw"]
|
||||||
|
[ext_resource type="Script" uid="uid://chl0yv2tsg2va" path="res://resources/MeetingActionResource.cs" id="1_8teln"]
|
||||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://resources/MeetingResource.cs" id="1_qndny"]
|
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://resources/MeetingResource.cs" id="1_qndny"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_b6clr"]
|
[sub_resource type="Resource" id="Resource_b6clr"]
|
||||||
@@ -10,8 +11,7 @@ metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_qndny")
|
script = ExtResource("1_qndny")
|
||||||
OnMeetingStartActions = Array[Object]([SubResource("Resource_b6clr")])
|
OnMeetingStartActions = Array[ExtResource("1_8teln")]([SubResource("Resource_b6clr")])
|
||||||
OnMeetingEndActions = null
|
|
||||||
Title = "Work on your Product"
|
Title = "Work on your Product"
|
||||||
Color = Color(0.4354798, 0.3262509, 0.83488727, 1)
|
Color = Color(0.4354798, 0.3262509, 0.83488727, 1)
|
||||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||||
|
|||||||
Reference in New Issue
Block a user