add more meetings
This commit is contained in:
1
Ceo.cs.uid
Normal file
1
Ceo.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://6h417qfqcy3x
|
||||
@@ -7,11 +7,13 @@ namespace Game;
|
||||
[SceneTree]
|
||||
public partial class DaySchedule : PanelContainer
|
||||
{
|
||||
private int _currentSlot;
|
||||
private TimeSlot _currentTimeSlot;
|
||||
|
||||
[Export]
|
||||
private int _hoursInDay = 6;
|
||||
|
||||
private int _newTimeSlot;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
TimeSlotContainer.GetChildren().ToList().ForEach(child => child.QueueFree());
|
||||
@@ -36,15 +38,18 @@ public partial class DaySchedule : PanelContainer
|
||||
|
||||
private void OnNewMeetingStarts()
|
||||
{
|
||||
if (_currentSlot >= GetTimeSlots().Count)
|
||||
_currentTimeSlot?.EndMeeting();
|
||||
|
||||
if (_newTimeSlot >= GetTimeSlots().Count)
|
||||
{
|
||||
EndDay();
|
||||
return;
|
||||
}
|
||||
|
||||
GetTimeSlots()[_currentSlot].StartMeeting();
|
||||
_currentTimeSlot = GetTimeSlots()[_newTimeSlot];
|
||||
_currentTimeSlot.StartMeeting();
|
||||
|
||||
_currentSlot += 1;
|
||||
_newTimeSlot += 1;
|
||||
}
|
||||
|
||||
public void StartDay()
|
||||
@@ -52,8 +57,10 @@ public partial class DaySchedule : PanelContainer
|
||||
ProgressTimer.Start();
|
||||
CurrentTimeLine.Start();
|
||||
|
||||
GetTimeSlots().First().StartMeeting();
|
||||
_currentSlot += 1;
|
||||
_currentTimeSlot = GetTimeSlots().First();
|
||||
|
||||
_currentTimeSlot.StartMeeting();
|
||||
_newTimeSlot += 1;
|
||||
|
||||
EventBus.DayStarted?.Invoke();
|
||||
}
|
||||
@@ -61,6 +68,10 @@ public partial class DaySchedule : PanelContainer
|
||||
public void EndDay()
|
||||
{
|
||||
GD.Print("The DAY was EXECUTED!");
|
||||
|
||||
_currentTimeSlot = null;
|
||||
_newTimeSlot = 0;
|
||||
|
||||
ProgressTimer.Stop();
|
||||
CurrentTimeLine.Stop();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dciugg77wsy6p" path="res://MeetingPhysicsBox.tscn" id="4_20pc6"]
|
||||
[ext_resource type="Resource" uid="uid://mifwco1yj8kc" path="res://Resources/Meetings/coffee_meeting.tres" id="5_5vvyt"]
|
||||
[ext_resource type="Resource" uid="uid://du72uxjqr0h4a" path="res://Resources/Meetings/lockin.tres" id="6_c6i3y"]
|
||||
[ext_resource type="Resource" uid="uid://cqws366eaxso3" path="res://Resources/Meetings/tweet.tres" id="6_wkp8b"]
|
||||
[ext_resource type="Resource" uid="uid://bcd4qf4i84pwf" path="res://Resources/Meetings/work_product_1.tres" id="7_c2ibq"]
|
||||
[ext_resource type="Script" uid="uid://bs531c76ivhtf" path="res://DropZone.cs" id="8_j4qnp"]
|
||||
|
||||
@@ -86,7 +87,7 @@ offset_left = -498.0
|
||||
offset_top = -269.0
|
||||
offset_right = -284.0
|
||||
offset_bottom = -256.0
|
||||
_hoursInDay = 2
|
||||
_hoursInDay = 5
|
||||
|
||||
[node name="ExecuteButton" type="Button" parent="." unique_id=312490567]
|
||||
unique_name_in_owner = true
|
||||
@@ -119,7 +120,7 @@ shape = SubResource("RectangleShape2D_ig7tw")
|
||||
|
||||
[node name="Meeting" parent="." unique_id=796440984 instance=ExtResource("4_20pc6")]
|
||||
position = Vector2(35, -776.00006)
|
||||
MeetingResource = ExtResource("5_5vvyt")
|
||||
MeetingResource = ExtResource("6_wkp8b")
|
||||
|
||||
[node name="Meeting4" parent="." unique_id=1960552374 instance=ExtResource("4_20pc6")]
|
||||
position = Vector2(108, -662.00006)
|
||||
@@ -159,7 +160,7 @@ MeetingResource = ExtResource("5_5vvyt")
|
||||
[node name="Meeting3" parent="." unique_id=673551448 instance=ExtResource("4_20pc6")]
|
||||
position = Vector2(163.99982, -503.0002)
|
||||
rotation = -0.18364333
|
||||
MeetingResource = ExtResource("5_5vvyt")
|
||||
MeetingResource = ExtResource("6_wkp8b")
|
||||
|
||||
[node name="DropZone" type="Control" parent="." unique_id=80494692]
|
||||
layout_mode = 3
|
||||
|
||||
11
TimeSlot.cs
11
TimeSlot.cs
@@ -37,10 +37,19 @@ public partial class TimeSlot : PanelContainer
|
||||
public void StartMeeting()
|
||||
{
|
||||
GD.Print("New Meeting starts!");
|
||||
var gameState = NodeExtensions.GetMain(this).GameState;
|
||||
var gameState = this.GetMain().GameState;
|
||||
|
||||
// TODO: TimeSlot hat bekommt die MeetingResource on Drop?? oder zumindest nicht über Gfx gehen
|
||||
MeetingControl?.MeetingControlGfx.MeetingResource.StartMeeting(gameState);
|
||||
MeetingControl?.Animate();
|
||||
}
|
||||
|
||||
public void EndMeeting()
|
||||
{
|
||||
GD.Print("Meeting Ends!");
|
||||
var gameState = this.GetMain().GameState;
|
||||
|
||||
// TODO: TimeSlot hat bekommt die MeetingResource on Drop?? oder zumindest nicht über Gfx gehen
|
||||
MeetingControl?.MeetingControlGfx.MeetingResource.EndMeeting(gameState);
|
||||
}
|
||||
}
|
||||
|
||||
15
resources/GainCeoCompetenceAction.cs
Normal file
15
resources/GainCeoCompetenceAction.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Godot;
|
||||
|
||||
namespace Game.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class GainCeoCompetenceAction : MeetingActionResource
|
||||
{
|
||||
[Export]
|
||||
public int Amount;
|
||||
|
||||
public override void Execute(GameState gameState)
|
||||
{
|
||||
gameState.Ceo.Energy += Amount;
|
||||
}
|
||||
}
|
||||
1
resources/GainCeoCompetenceAction.cs.uid
Normal file
1
resources/GainCeoCompetenceAction.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c00nt4hxy7las
|
||||
15
resources/GainCeoEnergyAction.cs
Normal file
15
resources/GainCeoEnergyAction.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Godot;
|
||||
|
||||
namespace Game.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class GainCeoEnergyAction : MeetingActionResource
|
||||
{
|
||||
[Export]
|
||||
public int Amount;
|
||||
|
||||
public override void Execute(GameState gameState)
|
||||
{
|
||||
gameState.Ceo.Energy += Amount;
|
||||
}
|
||||
}
|
||||
1
resources/GainCeoEnergyAction.cs.uid
Normal file
1
resources/GainCeoEnergyAction.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bnvg6odimyvbd
|
||||
15
resources/LooseCeoEnergyAction.cs
Normal file
15
resources/LooseCeoEnergyAction.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Godot;
|
||||
|
||||
namespace Game.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class LooseCeoEnergyAction : MeetingActionResource
|
||||
{
|
||||
[Export]
|
||||
public int Amount;
|
||||
|
||||
public override void Execute(GameState gameState)
|
||||
{
|
||||
gameState.Ceo.Energy -= Amount;
|
||||
}
|
||||
}
|
||||
1
resources/LooseCeoEnergyAction.cs.uid
Normal file
1
resources/LooseCeoEnergyAction.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dmr02bygpa406
|
||||
@@ -1,10 +1,17 @@
|
||||
[gd_resource type="Resource" format=3 uid="uid://mifwco1yj8kc"]
|
||||
[gd_resource type="Resource" script_class="MeetingResource" format=3 uid="uid://mifwco1yj8kc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://chl0yv2tsg2va" path="res://Resources/MeetingActionResource.cs" id="1_nqgj7"]
|
||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://Resources/MeetingResource.cs" id="1_s1cac"]
|
||||
[ext_resource type="Script" uid="uid://chl0yv2tsg2va" path="res://Resources/MeetingActionResource.cs" id="1_4fveh"]
|
||||
[ext_resource type="Script" uid="uid://bnvg6odimyvbd" path="res://Resources/GainCeoEnergyAction.cs" id="2_31h6c"]
|
||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://Resources/MeetingResource.cs" id="2_pgxqq"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pgxqq"]
|
||||
script = ExtResource("2_31h6c")
|
||||
Amount = 10
|
||||
metadata/_custom_type_script = "uid://bnvg6odimyvbd"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_s1cac")
|
||||
script = ExtResource("2_pgxqq")
|
||||
OnMeetingEndActions = Array[ExtResource("1_4fveh")]([SubResource("Resource_pgxqq")])
|
||||
Title = "Coffee Break"
|
||||
Color = Color(0.31983396, 0.4835437, 0.33250993, 1)
|
||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||
|
||||
@@ -1,17 +1,30 @@
|
||||
[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://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://chl0yv2tsg2va" path="res://Resources/MeetingActionResource.cs" id="1_ev2ut"]
|
||||
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://Resources/GainHypeAction.cs" id="2_8l0kp"]
|
||||
[ext_resource type="Script" uid="uid://dmr02bygpa406" path="res://Resources/LooseCeoEnergyAction.cs" id="2_lrp05"]
|
||||
[ext_resource type="Script" uid="uid://c00nt4hxy7las" path="res://Resources/GainCeoCompetenceAction.cs" id="3_8balm"]
|
||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://Resources/MeetingResource.cs" id="3_lrp05"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_03owx"]
|
||||
script = ExtResource("2_lrp05")
|
||||
Amount = 20
|
||||
metadata/_custom_type_script = "uid://dmr02bygpa406"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_8l0kp"]
|
||||
script = ExtResource("3_8balm")
|
||||
Amount = 2
|
||||
metadata/_custom_type_script = "uid://c00nt4hxy7las"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7t1gw"]
|
||||
script = ExtResource("1_qpv0b")
|
||||
script = ExtResource("2_8l0kp")
|
||||
Amount = 20
|
||||
metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_4yd4m")
|
||||
OnMeetingStartActions = Array[ExtResource("1_edffo")]([SubResource("Resource_7t1gw")])
|
||||
script = ExtResource("3_lrp05")
|
||||
OnMeetingStartActions = Array[ExtResource("1_ev2ut")]([SubResource("Resource_7t1gw")])
|
||||
OnMeetingEndActions = Array[ExtResource("1_ev2ut")]([SubResource("Resource_03owx"), SubResource("Resource_8l0kp")])
|
||||
Title = "LOCK IN"
|
||||
Color = Color(0.73206806, 0.22440341, 0.33911285, 1)
|
||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||
|
||||
24
resources/meetings/tweet.tres
Normal file
24
resources/meetings/tweet.tres
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_resource type="Resource" script_class="MeetingResource" format=3 uid="uid://cqws366eaxso3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://chl0yv2tsg2va" path="res://Resources/MeetingActionResource.cs" id="1_iko52"]
|
||||
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://Resources/GainHypeAction.cs" id="2_3aidk"]
|
||||
[ext_resource type="Script" uid="uid://dmr02bygpa406" path="res://Resources/LooseCeoEnergyAction.cs" id="2_b7ym2"]
|
||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://Resources/MeetingResource.cs" id="2_rxsgf"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_b7ym2"]
|
||||
script = ExtResource("2_b7ym2")
|
||||
Amount = 2
|
||||
metadata/_custom_type_script = "uid://dmr02bygpa406"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_iko52"]
|
||||
script = ExtResource("2_3aidk")
|
||||
Amount = 10
|
||||
metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_rxsgf")
|
||||
OnMeetingStartActions = Array[ExtResource("1_iko52")]([SubResource("Resource_iko52")])
|
||||
OnMeetingEndActions = Array[ExtResource("1_iko52")]([SubResource("Resource_b7ym2")])
|
||||
Title = "Tweet Something"
|
||||
Color = Color(0.11372549, 0.6313726, 0.9490196, 1)
|
||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||
@@ -1,17 +1,24 @@
|
||||
[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://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://chl0yv2tsg2va" path="res://Resources/MeetingActionResource.cs" id="1_rr1cc"]
|
||||
[ext_resource type="Script" uid="uid://cduoflv3vjfmg" path="res://Resources/GainHypeAction.cs" id="2_dts6e"]
|
||||
[ext_resource type="Script" uid="uid://dmr02bygpa406" path="res://Resources/LooseCeoEnergyAction.cs" id="2_uga8y"]
|
||||
[ext_resource type="Script" uid="uid://cuq38lbfa2v74" path="res://Resources/MeetingResource.cs" id="3_uga8y"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_8l0kp"]
|
||||
script = ExtResource("2_uga8y")
|
||||
Amount = 10
|
||||
metadata/_custom_type_script = "uid://dmr02bygpa406"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_b6clr"]
|
||||
script = ExtResource("1_7t1gw")
|
||||
script = ExtResource("2_dts6e")
|
||||
Amount = 10
|
||||
metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_qndny")
|
||||
OnMeetingStartActions = Array[ExtResource("1_8teln")]([SubResource("Resource_b6clr")])
|
||||
script = ExtResource("3_uga8y")
|
||||
OnMeetingStartActions = Array[ExtResource("1_rr1cc")]([SubResource("Resource_b6clr")])
|
||||
OnMeetingEndActions = Array[ExtResource("1_rr1cc")]([SubResource("Resource_8l0kp")])
|
||||
Title = "Work on your Product"
|
||||
Color = Color(0.4354798, 0.3262509, 0.83488727, 1)
|
||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||
|
||||
Reference in New Issue
Block a user