Tuesday, 19 August 2025 01:37:27
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Arena : Sprite2D
|
||||
public partial class Desk : Sprite2D
|
||||
{
|
||||
|
||||
|
||||
@@ -4,15 +4,16 @@ using System.Collections.Generic;
|
||||
|
||||
public partial class Effect : Node
|
||||
{
|
||||
public List<Trigger> _trigger;
|
||||
public Worker _workerOwner;
|
||||
public List<Trigger> _trigger = new();
|
||||
public List<Trigger> _expirations = new();
|
||||
public Node2D _owner;
|
||||
|
||||
public void SetOwner()
|
||||
public Effect(Node2D OWNER)
|
||||
{
|
||||
|
||||
_owner = OWNER;
|
||||
}
|
||||
|
||||
public virtual void TriggerEffect()
|
||||
public virtual void TriggerEffect(Node TARGET = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -4,17 +4,26 @@ using System.Collections.Generic;
|
||||
|
||||
public partial class BasicAttack : Effect
|
||||
{
|
||||
public BasicAttack() : base()
|
||||
public BasicAttack(Node2D OWNER) : base(OWNER)
|
||||
{
|
||||
_trigger.Add(Trigger.Collision);
|
||||
}
|
||||
|
||||
public override void TriggerEffect()
|
||||
public override void TriggerEffect(Node TARGET = null)
|
||||
{
|
||||
if (_workerOwner._collisionTarget is Worker)
|
||||
if (TARGET is Worker)
|
||||
{
|
||||
int damage = _workerOwner._aptitude;
|
||||
((Worker)_workerOwner._collisionTarget).ChangeHealth(damage, _workerOwner);
|
||||
Worker target = (Worker)TARGET;
|
||||
if (_owner is Worker)
|
||||
{
|
||||
Worker owner = (Worker)_owner;
|
||||
if (target._manager != owner._manager)
|
||||
{
|
||||
int damage = -owner._aptitude / 2;
|
||||
target.ChangeHealth(damage, owner);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
Gameplay/Effects/Caffeinate.cs
Normal file
22
Gameplay/Effects/Caffeinate.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Caffeinate : Effect
|
||||
{
|
||||
public Caffeinate(Node2D OWNER) : base(OWNER)
|
||||
{
|
||||
_trigger.Add(Trigger.Collision);
|
||||
}
|
||||
|
||||
public override void TriggerEffect(Node TARGET = null)
|
||||
{
|
||||
if (TARGET is Worker)
|
||||
{
|
||||
Worker target = (Worker)TARGET;
|
||||
target._rotationalForce += 10;
|
||||
Vector2 targetDistanceNormal = (target.Position - _owner.Position).Normalized();
|
||||
target.ApplyCentralForce(targetDistanceNormal * 10);
|
||||
target.ChangeHealth(-1, _owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Gameplay/Effects/Caffeinate.cs.uid
Normal file
1
Gameplay/Effects/Caffeinate.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cbk76ik5o17nx
|
||||
20
Gameplay/Effects/Spiky.cs
Normal file
20
Gameplay/Effects/Spiky.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Spiky : Effect
|
||||
{
|
||||
public Spiky(Node2D OWNER) : base(OWNER)
|
||||
{
|
||||
_trigger.Add(Trigger.Collision);
|
||||
}
|
||||
|
||||
public override void TriggerEffect(Node TARGET = null)
|
||||
{
|
||||
if (TARGET is Worker)
|
||||
{
|
||||
Worker target = (Worker)TARGET;
|
||||
target._rotationalForce += 10;
|
||||
target.ChangeHealth(-1, _owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Gameplay/Effects/Spiky.cs.uid
Normal file
1
Gameplay/Effects/Spiky.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ciwja82k4ihw6
|
||||
3
Gameplay/Effects/basic_attack.tscn
Normal file
3
Gameplay/Effects/basic_attack.tscn
Normal file
@@ -0,0 +1,3 @@
|
||||
[gd_scene format=3 uid="uid://bih70e65g1108"]
|
||||
|
||||
[node name="BasicAttack" type="Node"]
|
||||
6
Gameplay/Effects/caffeinate.tscn
Normal file
6
Gameplay/Effects/caffeinate.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bo2rj0albmkkw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cbk76ik5o17nx" path="res://Gameplay/Effects/Caffeinate.cs" id="1_2f3ha"]
|
||||
|
||||
[node name="Caffeinate" type="Node"]
|
||||
script = ExtResource("1_2f3ha")
|
||||
6
Gameplay/Effects/spiky.tscn
Normal file
6
Gameplay/Effects/spiky.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://cchjk4lohg8k3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ciwja82k4ihw6" path="res://Gameplay/Effects/Spiky.cs" id="1_levtu"]
|
||||
|
||||
[node name="Spiky" type="Node"]
|
||||
script = ExtResource("1_levtu")
|
||||
@@ -28,16 +28,24 @@ public partial class Manager : Node
|
||||
Worker newWorker = Globals.Instance._workerScene.Instantiate<Worker>();
|
||||
newWorker.Position = Globals.Instance._screenCenter + new Vector2(0, 100);
|
||||
newWorker._id = 1;
|
||||
newWorker._manager = this;
|
||||
AddChild(newWorker);
|
||||
_workers.Add(newWorker);
|
||||
|
||||
newWorker = Globals.Instance._workerScene.Instantiate<Worker>();
|
||||
newWorker.Position = Globals.Instance._screenCenter - new Vector2(0, 100);
|
||||
newWorker._id = 2;
|
||||
newWorker._manager = this;
|
||||
AddChild(newWorker);
|
||||
_workers.Add(newWorker);
|
||||
|
||||
Tchotchke newTchotchke = Globals.Instance._tchotchkeScene.Instantiate<Tchotchke>();
|
||||
for (int i = 0; i < _workers.Count; i++)
|
||||
{
|
||||
GD.Print(i + 1);
|
||||
_workers[i]._healthBar.Position = _managerPanel.GetNode<Panel>("Team").GetNode<Panel>("T"+(i+1)).GlobalPosition;
|
||||
}
|
||||
|
||||
AwfullyHotCoffeePot newTchotchke = ResourceLoader.Load<PackedScene>("res://Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn").Instantiate<AwfullyHotCoffeePot>();
|
||||
newTchotchke.Position = new Vector2(Globals.Instance._screenSize.X - 100, Globals.Instance._screenCenter.Y);
|
||||
AddChild(newTchotchke);
|
||||
_tchotckes.Add(newTchotchke);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Tchotchke : StaticBody2D
|
||||
{
|
||||
public bool _hovered = false, _held = false;
|
||||
|
||||
public List<Effect> _effects = new();
|
||||
|
||||
public override void _Process(double DELTA_)
|
||||
{
|
||||
@@ -29,11 +30,11 @@ public partial class Tchotchke : StaticBody2D
|
||||
}
|
||||
if (Input.IsActionJustPressed("scroll_up"))
|
||||
{
|
||||
Rotation -= 1;
|
||||
Rotation -= 1.0f * (float)(Math.PI) / 180.0f;
|
||||
}
|
||||
if (Input.IsActionJustPressed("scroll_down"))
|
||||
{
|
||||
Rotation += 1;
|
||||
Rotation += 1.0f * (float)(Math.PI) / 180.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,12 +72,13 @@ public partial class Tchotchke : StaticBody2D
|
||||
|
||||
private void OnBodyEntered(Node NODE)
|
||||
{
|
||||
if (NODE is Worker)
|
||||
{
|
||||
// _rotationalForce *= 0.8f;
|
||||
// Vector2 rotatedForce = LinearVelocity.Rotated(((Worker)NODE)._rotationalForce);
|
||||
|
||||
// ApplyCentralForce(rotatedForce);
|
||||
}
|
||||
if (NODE is Worker)
|
||||
{
|
||||
for (int i = 0; i < _effects.Count; i++)
|
||||
{
|
||||
GD.Print(1001);
|
||||
_effects[i].TriggerEffect((Worker)NODE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs
Normal file
10
Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class AwfullyHotCoffeePot : Tchotchke
|
||||
{
|
||||
public AwfullyHotCoffeePot() : base()
|
||||
{
|
||||
_effects.Add(new Caffeinate(this));
|
||||
}
|
||||
}
|
||||
1
Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs.uid
Normal file
1
Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cs41fy2tdmox8
|
||||
7
Gameplay/Tchotchkes/RedStapler.cs
Normal file
7
Gameplay/Tchotchkes/RedStapler.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class RedStapler : Tchotchke
|
||||
{
|
||||
|
||||
}
|
||||
1
Gameplay/Tchotchkes/RedStapler.cs.uid
Normal file
1
Gameplay/Tchotchkes/RedStapler.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://suk6jbpwmu1r
|
||||
36
Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn
Normal file
36
Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn
Normal file
@@ -0,0 +1,36 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cbmpor83jpggo"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cs41fy2tdmox8" path="res://Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs" id="2_mvvpy"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1tv50tj5cprl" path="res://art/coffee.png" id="3_r4u41"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_smj0g"]
|
||||
radius = 32.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_yxdnl"]
|
||||
radius = 32.0
|
||||
|
||||
[node name="AwfullyHotCoffeePot" type="StaticBody2D"]
|
||||
input_pickable = true
|
||||
script = ExtResource("2_mvvpy")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("3_r4u41")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_smj0g")
|
||||
|
||||
[node name="Gravity" type="Area2D" parent="."]
|
||||
gravity_space_override = 1
|
||||
gravity_point = true
|
||||
gravity_point_unit_distance = 32.0
|
||||
gravity_point_center = Vector2(0, 0)
|
||||
gravity_direction = Vector2(0, 0)
|
||||
gravity = 5.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
|
||||
shape = SubResource("CircleShape2D_yxdnl")
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]
|
||||
[connection signal="body_entered" from="Gravity" to="." method="OnBodyEntered"]
|
||||
35
Gameplay/Tchotchkes/red_stapler.tscn
Normal file
35
Gameplay/Tchotchkes/red_stapler.tscn
Normal file
@@ -0,0 +1,35 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bjml4u7mieb3a"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://suk6jbpwmu1r" path="res://Gameplay/Tchotchkes/RedStapler.cs" id="2_1dddf"]
|
||||
[ext_resource type="Texture2D" uid="uid://d332fv8lhg8na" path="res://art/redstapler.png" id="2_rllbf"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1dddf"]
|
||||
radius = 29.0
|
||||
height = 94.0
|
||||
|
||||
[node name="RedStapler" type="StaticBody2D"]
|
||||
input_pickable = true
|
||||
script = ExtResource("2_1dddf")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
rotation = -1.0472
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_rllbf")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CapsuleShape2D_1dddf")
|
||||
|
||||
[node name="Gravity" type="Area2D" parent="."]
|
||||
gravity_space_override = 1
|
||||
gravity_point = true
|
||||
gravity_point_unit_distance = 32.0
|
||||
gravity_point_center = Vector2(0, 0)
|
||||
gravity_direction = Vector2(0, 0)
|
||||
gravity = 5.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
|
||||
shape = SubResource("CapsuleShape2D_1dddf")
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]
|
||||
[connection signal="body_entered" from="Gravity" to="." method="OnBodyEntered"]
|
||||
@@ -12,6 +12,7 @@ public partial class Worker : RigidBody2D
|
||||
public Vector2 _force = Vector2.Zero;
|
||||
public Node _collisionTarget;
|
||||
public Sprite2D _image;
|
||||
public ProgressBar _healthBar;
|
||||
public Manager _manager;
|
||||
public List<Effect> _effects = new();
|
||||
public override void _Ready()
|
||||
@@ -26,6 +27,12 @@ public partial class Worker : RigidBody2D
|
||||
|
||||
_healthMax = _health;
|
||||
_image = GetNode<Sprite2D>("Sprite2D");
|
||||
|
||||
_effects.Add(new BasicAttack(this));
|
||||
|
||||
_healthBar = GetNode<ProgressBar>("HealthBar");
|
||||
_healthBar.MaxValue = _healthMax;
|
||||
_healthBar.Value = _health;
|
||||
}
|
||||
|
||||
public override void _Process(double DELTA_)
|
||||
@@ -104,11 +111,13 @@ public partial class Worker : RigidBody2D
|
||||
// process on knockout
|
||||
}
|
||||
_health += CHANGE;
|
||||
_healthBar.Value = _health;
|
||||
if (_health <= 0)
|
||||
{
|
||||
Sleeping = true;
|
||||
_dead = true;
|
||||
_health = 0;
|
||||
TriggerSpecificEffects(Effect.Trigger.Death);
|
||||
TriggerSpecificEffects(Effect.Trigger.Death, _manager);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +149,7 @@ public partial class Worker : RigidBody2D
|
||||
ApplyCentralForce(_force);
|
||||
_force = Vector2.Zero;
|
||||
_primed = false;
|
||||
TriggerSpecificEffects(Effect.Trigger.Launch);
|
||||
TriggerSpecificEffects(Effect.Trigger.Launch, _manager);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
@@ -149,16 +158,18 @@ public partial class Worker : RigidBody2D
|
||||
Sleeping = true;
|
||||
_moving = false;
|
||||
_rotationalForce = 0f;
|
||||
TriggerSpecificEffects(Effect.Trigger.Stop);
|
||||
TriggerSpecificEffects(Effect.Trigger.Stop, _manager);
|
||||
}
|
||||
|
||||
public void TriggerSpecificEffects(Effect.Trigger TRIGGER)
|
||||
public void TriggerSpecificEffects(Effect.Trigger TRIGGER, Node TARGET = null)
|
||||
{
|
||||
List<Effect> triggeredEffects = _effects.Where(e => e._trigger.IndexOf(TRIGGER) > -1).ToList();
|
||||
for (int i = 0; i < triggeredEffects.Count; i++)
|
||||
{
|
||||
triggeredEffects[i].TriggerEffect();
|
||||
triggeredEffects[i].TriggerEffect(TARGET);
|
||||
}
|
||||
List<Effect> expiredEffects = _effects.Where(e => e._trigger.IndexOf(TRIGGER) > -1).ToList();
|
||||
_effects.Except(expiredEffects);
|
||||
}
|
||||
|
||||
// PRIVATE METHODS
|
||||
@@ -177,7 +188,7 @@ public partial class Worker : RigidBody2D
|
||||
if (NODE is Worker)
|
||||
{
|
||||
_collisionTarget = NODE;
|
||||
TriggerSpecificEffects(Effect.Trigger.Stop);
|
||||
TriggerSpecificEffects(Effect.Trigger.Collision, NODE);
|
||||
|
||||
_rotationalForce *= 0.8f;
|
||||
Vector2 rotatedForce = LinearVelocity.Rotated(((Worker)NODE)._rotationalForce);
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://demwh8ek37mnx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://pxi753iie75t" path="res://Gameplay/Arena.cs" id="1_3it5u"]
|
||||
[ext_resource type="Texture2D" uid="uid://nxo2tpgmobli" path="res://art/arena.png" id="1_ya27x"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ya27x"]
|
||||
radius = 400.25
|
||||
|
||||
[node name="Arena" type="Sprite2D"]
|
||||
texture = ExtResource("1_ya27x")
|
||||
script = ExtResource("1_3it5u")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
|
||||
visible = false
|
||||
polygon = PackedVector2Array(-2, -303, 150, -302, 150, -372, 218, -336, 268, -296, 310, -254, 347, -201, 373, -146, 390, -85, 398, -33, 400, 1, 398, 30, 394, 69, 388, 99, 377, 135, 355, 184, 339, 213, 312, 250, 291, 276, 268, 298, 249, 314, 209, 341, 183, 356, 167, 364, 150, 370, 150, 301, -2, 300, -1, 791, 937, 791, 935, -974, -5, -990)
|
||||
|
||||
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="StaticBody2D"]
|
||||
visible = false
|
||||
rotation = 3.14159
|
||||
scale = Vector2(1, -1)
|
||||
polygon = PackedVector2Array(-2, -303, 150, -302, 150, -372, 218, -336, 268, -296, 310, -254, 347, -201, 373, -146, 390, -85, 398, -33, 400, 1, 398, 30, 394, 69, 388, 99, 377, 135, 355, 184, 339, 213, 312, 250, 291, 276, 268, 298, 249, 314, 209, 341, 183, 356, 167, 364, 150, 370, 150, 301, -2, 300, -1, 791, 937, 791, 935, -974, -5, -990)
|
||||
|
||||
[node name="CollisionPolygon2D3" type="CollisionPolygon2D" parent="StaticBody2D"]
|
||||
polygon = PackedVector2Array(-800, 800, -153, 800, -153, 366.8, -198.5, 344, -200.4, 344, -245.4, 312, -247.2, 312, -295.2, 266, -296, 266, -324, 230, -324.9, 230, -343.9, 199, -344.7, 199, -362.7, 162, -363.6, 162, -379.6, 117, -380.3, 117, -393.4, 55, -394.1, 55, -398, 6, -398, -5.79999, -394, -48.9, -394, -57, -380, -114.8, -380, -118.5, -363, -160.6, -363, -163.5, -349, -189.5, -349, -191.4, -324, -229.4, -324, -231.3, -295, -265.3, -295, -267.1, -246, -312.1, -246, -312.9, -199, -343.9, -199, -344.8, -152, -366.8, -152, -298, 152, -298, 152, -366.9, 189.5, -349, 191.4, -349, 208.4, -338, 210.3, -338, 257.3, -302, 259.2, -302, 295.2, -266, 296, -266, 324, -230, 324.9, -230, 343.9, -199, 344.7, -199, 365.7, -155, 366.6, -155, 382.6, -107, 383.3, -107, 393.3, -55, 394.1, -55, 397.1, -4, 397.9, -4, 396, 28.9, 396, 39.7, 391, 68.8, 391, 75, 375, 130.7, 375, 133.6, 363, 160.6, 363, 163.3, 344, 198.5, 344, 200.3, 312, 245.4, 312, 247.2, 266, 295.2, 266, 296, 230, 324, 230, 324.9, 190, 348.9, 190, 349.7, 153.8, 365.9, 151.9, 298, -152, 298, -152, 800, 800, 800, 800, -800, -800, -800)
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
gravity_space_override = 1
|
||||
gravity_point = true
|
||||
gravity_point_center = Vector2(0, 0)
|
||||
gravity_direction = Vector2(0, 0)
|
||||
gravity = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource("CircleShape2D_ya27x")
|
||||
@@ -1,9 +1,11 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://5ymxo45j4ryt"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://0c1u4l8lu07h" path="res://Gameplay/Battle.cs" id="1_i431l"]
|
||||
[ext_resource type="PackedScene" uid="uid://demwh8ek37mnx" path="res://Gameplay/arena.tscn" id="2_fkh6t"]
|
||||
[ext_resource type="PackedScene" uid="uid://demwh8ek37mnx" path="res://Gameplay/desk.tscn" id="2_fkh6t"]
|
||||
|
||||
[node name="Battle" type="Node" groups=["battles"]]
|
||||
script = ExtResource("1_i431l")
|
||||
|
||||
[node name="Arena" parent="." instance=ExtResource("2_fkh6t")]
|
||||
[node name="Desk" parent="." instance=ExtResource("2_fkh6t")]
|
||||
position = Vector2(960, 540)
|
||||
rotation = 1.5708
|
||||
|
||||
30
Gameplay/desk.tscn
Normal file
30
Gameplay/desk.tscn
Normal file
@@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://demwh8ek37mnx"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://w4cxyhjvmkq1" path="res://art/desk.png" id="1_21bwm"]
|
||||
[ext_resource type="Script" uid="uid://pxi753iie75t" path="res://Gameplay/Desk.cs" id="2_15p4t"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_fw0uc"]
|
||||
radius = 88.5
|
||||
height = 566.0
|
||||
|
||||
[node name="Desk" type="Sprite2D"]
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("1_21bwm")
|
||||
script = ExtResource("2_15p4t")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
|
||||
polygon = PackedVector2Array(34.5, -87.5, 60.5, -87.5, 131.5, -87, 245, -78.5, 251, -77, 265, -55.5, 273, -16, 272.5, 0.5, 269.5, 31, 264, 58, 251, 76, 220.5, 81.5, 144, 85, 54, 87, 0, 87, -88.5, 85, -167, 84.5, -246, 77.5, -260, 62.5, -271.5, 22.5, -272, -0.5, -271.5, -25.5, -266, -47, -257, -70.5, -248, -79, -186.5, -84, -105, -87, -17.5, -87.5, 34.5, -87.5, 35, -335, -418.5, -337, -421, 448, 439, 445, 438.5, -357.5, 35, -334.5)
|
||||
|
||||
[node name="Gravity" type="Area2D" parent="."]
|
||||
visible = false
|
||||
gravity_space_override = 1
|
||||
gravity_point = true
|
||||
gravity_point_center = Vector2(0, 0)
|
||||
gravity_direction = Vector2(0, 0)
|
||||
gravity = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_fw0uc")
|
||||
@@ -1,3 +1,3 @@
|
||||
[gd_scene load_steps=0 format=3 uid="uid://bp2xesqosn4fk"]
|
||||
[gd_scene format=3 uid="uid://becqya8l8feni"]
|
||||
|
||||
[node name="ProcessEffect" type="Node"]
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
[ext_resource type="Script" uid="uid://qmgo5eukvn6y" path="res://Gameplay/Tchotchke.cs" id="1_c08fi"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1tv50tj5cprl" path="res://art/coffee.png" id="2_gl5mj"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_d82wc"]
|
||||
radius = 31.1448
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_gl5mj"]
|
||||
radius = 65.0
|
||||
radius = 32.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_d82wc"]
|
||||
radius = 32.0
|
||||
|
||||
[node name="Tchotchke" type="StaticBody2D"]
|
||||
input_pickable = true
|
||||
@@ -18,17 +18,19 @@ scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_gl5mj")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_d82wc")
|
||||
shape = SubResource("CircleShape2D_gl5mj")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
[node name="Gravity" type="Area2D" parent="."]
|
||||
gravity_space_override = 1
|
||||
gravity_point = true
|
||||
gravity_point_unit_distance = 32.0
|
||||
gravity_point_center = Vector2(0, 0)
|
||||
gravity_direction = Vector2(0, 0)
|
||||
gravity = 50.0
|
||||
gravity = 5.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource("CircleShape2D_gl5mj")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
|
||||
shape = SubResource("CircleShape2D_d82wc")
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]
|
||||
[connection signal="body_entered" from="Gravity" to="." method="OnBodyEntered"]
|
||||
|
||||
@@ -9,7 +9,7 @@ bounce = 3.0
|
||||
load_path = "res://.godot/imported/beyblade.png-cd6ee3474fe554271afbb31b55fadfb5.ctex"
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_e314i"]
|
||||
radius = 80.0
|
||||
radius = 32.0
|
||||
|
||||
[node name="Worker" type="RigidBody2D"]
|
||||
input_pickable = true
|
||||
@@ -23,6 +23,12 @@ max_contacts_reported = 1
|
||||
linear_damp = 0.25
|
||||
script = ExtResource("1_e314i")
|
||||
|
||||
[node name="HealthBar" type="ProgressBar" parent="."]
|
||||
top_level = true
|
||||
offset_right = 150.0
|
||||
offset_bottom = 27.0
|
||||
step = 1.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
scale = Vector2(0.2, 0.2)
|
||||
texture = SubResource("CompressedTexture2D_e314i")
|
||||
@@ -31,14 +37,15 @@ texture = SubResource("CompressedTexture2D_e314i")
|
||||
scale = Vector2(0.2, 0.2)
|
||||
polygon = PackedVector2Array(8, -171, -17, -171, -17, -169.9, -26.2, -169, -29.5, -169, -62, -151.2, -84, -152.9, -84, -154.4, -102.4, -151, -104.7, -151, -150.8, -114, -153, -114, -174, -88, -175.3, -88, -180, -77.7, -180, 44.2, -178, 46.7, -178, 48.3, -163.5, 54.9, -155, 81.2, -155, 83.9, -135.8, 102, -134.9, 102, -114, 126.7, -114, 128.2, -97.5, 137, -96.1, 137, -92, 143.6, -92, 146, -82, 152.9, -82, 154.5, -34, 167.4, -34, 168.7, -18.1, 171, 31.2, 171, 49.4, 167, 52.7, 167, 68, 155, 68, 154.2, 110.5, 134, 112.7, 134, 137.7, 114, 139.7, 114, 142, 98.1, 142, 92.9, 156.9, 79, 158.4, 79, 171.4, 45, 173.1, 45, 172, 22.9, 172, 13.6, 180, 1.10001, 180, -65.5, 159, -106.6, 159, -108.7, 134, -140.7, 134, -142.3, 121.4, -148, 112.5, -148, 101.4, -142, 97.3, -142, 75, -151.3, 75, -152.5, 50.3, -159, 47.5, -159, 39, -164.1, 39, -165.8, 8, -169.8)
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
[node name="Gravity" type="Area2D" parent="."]
|
||||
gravity_space_override = 1
|
||||
gravity_point = true
|
||||
gravity_point_unit_distance = 32.0
|
||||
gravity_point_center = Vector2(0, 0)
|
||||
gravity_direction = Vector2(0, 0)
|
||||
gravity = 50.0
|
||||
gravity = 5.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
|
||||
shape = SubResource("CircleShape2D_e314i")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="OnBodyEntered"]
|
||||
|
||||
BIN
art/desk.png
Normal file
BIN
art/desk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 147 KiB |
34
art/desk.png.import
Normal file
34
art/desk.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://w4cxyhjvmkq1"
|
||||
path="res://.godot/imported/desk.png-5ab472c6092f11b3c07bcef1a7548dfb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/desk.png"
|
||||
dest_files=["res://.godot/imported/desk.png-5ab472c6092f11b3c07bcef1a7548dfb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
art/redstapler.png
Normal file
BIN
art/redstapler.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 506 KiB |
34
art/redstapler.png.import
Normal file
34
art/redstapler.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d332fv8lhg8na"
|
||||
path="res://.godot/imported/redstapler.png-a427de8096ab80a30847aa6d8dd1d302.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/redstapler.png"
|
||||
dest_files=["res://.godot/imported/redstapler.png-a427de8096ab80a30847aa6d8dd1d302.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Reference in New Issue
Block a user