nice nice nice
This commit is contained in:
14
resources/GainHypeAction.cs
Normal file
14
resources/GainHypeAction.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Godot;
|
||||
using yourareanaiceo;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class GainHypeAction : MeetingActionResource
|
||||
{
|
||||
[Export]
|
||||
public int Amount;
|
||||
|
||||
public override void Execute(GameState gameState)
|
||||
{
|
||||
gameState.Company.Hype += Amount;
|
||||
}
|
||||
}
|
||||
1
resources/GainHypeAction.cs.uid
Normal file
1
resources/GainHypeAction.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cduoflv3vjfmg
|
||||
8
resources/MeetingActionResource.cs
Normal file
8
resources/MeetingActionResource.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Godot;
|
||||
using yourareanaiceo;
|
||||
|
||||
[GlobalClass]
|
||||
public abstract partial class MeetingActionResource : Resource
|
||||
{
|
||||
public abstract void Execute(GameState gameState);
|
||||
}
|
||||
1
resources/MeetingActionResource.cs.uid
Normal file
1
resources/MeetingActionResource.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://chl0yv2tsg2va
|
||||
@@ -1,13 +1,32 @@
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
using yourareanaiceo;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class MeetingResource : Resource
|
||||
{
|
||||
[Export]
|
||||
public Array<MeetingActionResource> OnMeetingStartActions { get; set; } = [];
|
||||
|
||||
[Export]
|
||||
public Array<MeetingActionResource> OnMeetingEndActions { get; set; } = [];
|
||||
|
||||
[Export]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Export]
|
||||
public Color Color { get; set; }
|
||||
|
||||
public void StartMeeting(GameState gameState)
|
||||
{
|
||||
OnMeetingStartActions.ToList().ForEach(m => m.Execute(gameState));
|
||||
}
|
||||
|
||||
public void EndMeeting(GameState gameState)
|
||||
{
|
||||
OnMeetingEndActions.ToList().ForEach(m => m.Execute(gameState));
|
||||
}
|
||||
}
|
||||
|
||||
public partial class DummyMeetingResource : MeetingResource
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
[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://cduoflv3vjfmg" path="res://resources/GainHypeAction.cs" id="1_qpv0b"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7t1gw"]
|
||||
script = ExtResource("1_qpv0b")
|
||||
Amount = 20
|
||||
metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_4yd4m")
|
||||
OnMeetingStartActions = Array[Object]([SubResource("Resource_7t1gw")])
|
||||
OnMeetingEndActions = null
|
||||
Title = "LOCK IN"
|
||||
Color = Color(0.73206806, 0.22440341, 0.33911285, 1)
|
||||
metadata/_custom_type_script = "uid://cuq38lbfa2v74"
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
[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://cuq38lbfa2v74" path="res://resources/MeetingResource.cs" id="1_qndny"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_b6clr"]
|
||||
script = ExtResource("1_7t1gw")
|
||||
Amount = 10
|
||||
metadata/_custom_type_script = "uid://cduoflv3vjfmg"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_qndny")
|
||||
OnMeetingStartActions = Array[Object]([SubResource("Resource_b6clr")])
|
||||
OnMeetingEndActions = null
|
||||
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