adding in some example pegs and their actions. organizing folders, still working on pathing for some reason it won't move sometimes, and causes the looping to break
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Archer : HostilePeg
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
_stamina = 2;
|
||||
_action = GetNode<Shortbow>("Shortbow");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://b3a0x3r3yx861
|
||||
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Infantry : HostilePeg
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
_stamina = 3;
|
||||
_action = GetNode<Shortsword>("Shortsword");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://xlg4cblo1vf1
|
||||
@@ -0,0 +1,38 @@
|
||||
[gd_scene format=3 uid="uid://dwqhme11j5ihb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3a0x3r3yx861" path="res://Pegs/HostilePegs/Archer.cs" id="1_ij48w"]
|
||||
[ext_resource type="Texture2D" uid="uid://nwj4n7if8kqd" path="res://Art/circle25r.png" id="2_j7but"]
|
||||
[ext_resource type="PackedScene" uid="uid://duspilwelsiy3" path="res://Pegs/Actions/shortbow.tscn" id="3_c81uf"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_7k104"]
|
||||
bounce = 0.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4gyqm"]
|
||||
radius = 12.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_6w6fg"]
|
||||
radius = 12.5
|
||||
|
||||
[node name="Archer" type="StaticBody2D" unique_id=1417697759]
|
||||
input_pickable = true
|
||||
physics_material_override = SubResource("PhysicsMaterial_7k104")
|
||||
script = ExtResource("1_ij48w")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1762191899]
|
||||
shape = SubResource("CircleShape2D_4gyqm")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1941012605]
|
||||
self_modulate = Color(0, 0, 1, 1)
|
||||
texture_filter = 1
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("2_j7but")
|
||||
|
||||
[node name="Shortbow" parent="." unique_id=518048625 instance=ExtResource("3_c81uf")]
|
||||
|
||||
[node name="HoverBounds" type="Area2D" parent="." unique_id=937525982]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HoverBounds" unique_id=2142666816]
|
||||
shape = SubResource("CircleShape2D_6w6fg")
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]
|
||||
@@ -0,0 +1,38 @@
|
||||
[gd_scene format=3 uid="uid://d55ut168gh3k"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://xlg4cblo1vf1" path="res://Pegs/HostilePegs/Infantry.cs" id="1_wlksp"]
|
||||
[ext_resource type="Texture2D" uid="uid://nwj4n7if8kqd" path="res://Art/circle25r.png" id="2_b77ka"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6df6ib0qan5g" path="res://Pegs/Actions/shortsword.tscn" id="3_lwlv5"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_7k104"]
|
||||
bounce = 0.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4gyqm"]
|
||||
radius = 12.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_6w6fg"]
|
||||
radius = 12.5
|
||||
|
||||
[node name="Infantry" type="StaticBody2D" unique_id=1417697759]
|
||||
input_pickable = true
|
||||
physics_material_override = SubResource("PhysicsMaterial_7k104")
|
||||
script = ExtResource("1_wlksp")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1762191899]
|
||||
shape = SubResource("CircleShape2D_4gyqm")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1941012605]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
texture_filter = 1
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("2_b77ka")
|
||||
|
||||
[node name="Shortsword" parent="." unique_id=518048625 instance=ExtResource("3_lwlv5")]
|
||||
|
||||
[node name="HoverBounds" type="Area2D" parent="." unique_id=937525982]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HoverBounds" unique_id=2142666816]
|
||||
shape = SubResource("CircleShape2D_6w6fg")
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]
|
||||
Reference in New Issue
Block a user