This commit is contained in:
Tandy 2026-09-26 22:54:17 -06:00
commit 976db89477
5 changed files with 62 additions and 0 deletions

28
Troup.tscn Normal file
View file

@ -0,0 +1,28 @@
[gd_scene format=3 uid="uid://dmvsd7af0j8os"]
[ext_resource type="Script" uid="uid://ctevs31eqx4h8" path="res://troup.gd" id="1_xfhet"]
[ext_resource type="PackedScene" uid="uid://coebykrbnhlif" path="res://currency/members/MemberSprite.tscn" id="2_v0at3"]
[ext_resource type="Resource" uid="uid://ihsvxienxbeu" path="res://currency/sentient/knight.tres" id="3_qcrkc"]
[ext_resource type="Resource" uid="uid://dfbgxc6nlcjct" path="res://allegiance/bad.tres" id="4_sitmf"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_riqys"]
size = Vector2(98, 100)
[node name="CharacterBody2D" type="CharacterBody2D" unique_id=1581641385]
script = ExtResource("1_xfhet")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1841709482]
position = Vector2(50, 49)
shape = SubResource("RectangleShape2D_riqys")
[node name="MemberSprite" parent="." unique_id=283117283 instance=ExtResource("2_v0at3")]
instance_shader_parameters/border_color = Color(1, 0, 0, 1)
instance_shader_parameters/border_width = 0.16
instance_shader_parameters/fill_color = Color(1, 0.7529412, 0.79607844, 1)
custom_minimum_size = Vector2(100, 100)
offset_right = 100.0
offset_bottom = 100.0
currency = ExtResource("3_qcrkc")
allegiance = ExtResource("4_sitmf")
[editable path="MemberSprite"]

View file

@ -1,2 +1,5 @@
extends Currency extends Currency
class_name SentientCurrency class_name SentientCurrency
var selected = false

View file

@ -2,6 +2,7 @@
[ext_resource type="Texture2D" uid="uid://bntb4uxiugjq3" path="res://Map/EHAP_map.png" id="1_c7s6e"] [ext_resource type="Texture2D" uid="uid://bntb4uxiugjq3" path="res://Map/EHAP_map.png" id="1_c7s6e"]
[ext_resource type="Script" uid="uid://ws5ruc64db3v" path="res://CameraMove.gd" id="2_wijl4"] [ext_resource type="Script" uid="uid://ws5ruc64db3v" path="res://CameraMove.gd" id="2_wijl4"]
[ext_resource type="PackedScene" uid="uid://dmvsd7af0j8os" path="res://Troup.tscn" id="3_e0an3"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bhunq"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_bhunq"]
size = Vector2(184, 20) size = Vector2(184, 20)
@ -154,3 +155,7 @@ shape = SubResource("RectangleShape2D_6qsgm")
position = Vector2(1612.9999, -1555.9999) position = Vector2(1612.9999, -1555.9999)
rotation = -0.5846853 rotation = -0.5846853
shape = SubResource("RectangleShape2D_ooc2g") shape = SubResource("RectangleShape2D_ooc2g")
[node name="CharacterBody2D" parent="." unique_id=1581641385 node_paths=PackedStringArray("target") instance=ExtResource("3_e0an3")]
position = Vector2(886, 970)
target = NodePath("../EnemyGates/CollisionShape2D")

25
troup.gd Normal file
View file

@ -0,0 +1,25 @@
extends CharacterBody2D
const SPEED = 100.0
const JUMP_VELOCITY = -400.0
@export var target : Node2D
func _get_target(event) -> void:
if target != null:
return
if UserContext.selected_member == self:
pass
#func _Direction() -> Vector2:
#self.position = self.position.move_toward(target.transform.position, speed * delta)
func _physics_process(delta: float) -> void:
var num = abs(abs(self.global_position) - abs(target.global_position))
#print(num)
if (num > Vector2(2,2)):
self.position = self.position.move_toward(target.position, SPEED * delta)
move_and_slide()

1
troup.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://ctevs31eqx4h8