Tuesday, 19 August 2025 01:37:27
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user