mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:45:33 +00:00
New Fairies
This commit is contained in:
parent
54c8199e8a
commit
ce4df42890
11 changed files with 253 additions and 53 deletions
82
Resources/Sprites/Fairy.tres
Normal file
82
Resources/Sprites/Fairy.tres
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
[gd_resource type="SpriteFrames" load_steps=10 format=3 uid="uid://bcc5mlwwnkvri"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://xgxxdq37pykh" path="res://Sprites/Actors/Fairy.png" id="1_dnfgi"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_13sn2"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(0, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qs3gm"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(16, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fppxn"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(0, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_b01sl"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(16, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jgccb"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(0, 16, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_v7nm4"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(16, 16, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cciyq"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(0, 48, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_c2w8n"]
|
||||||
|
atlas = ExtResource("1_dnfgi")
|
||||||
|
region = Rect2(16, 48, 16, 16)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_13sn2")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qs3gm")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"down",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_fppxn")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_b01sl")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"left",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_jgccb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_v7nm4")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"right",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_cciyq")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_c2w8n")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"up",
|
||||||
|
"speed": 5.0
|
||||||
|
}]
|
||||||
|
|
@ -25,11 +25,12 @@ radius = 85.0529
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
|
||||||
radius = 5.09902
|
radius = 5.09902
|
||||||
|
|
||||||
[node name="ActorEnemyTest" type="CharacterBody2D"]
|
[node name="FairyGuard" type="CharacterBody2D"]
|
||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
collision_mask = 113
|
collision_mask = 113
|
||||||
script = ExtResource("1_ugrra")
|
script = ExtResource("1_ugrra")
|
||||||
MovementSpeed = 30.0
|
MovementSpeed = 30.0
|
||||||
|
Health = 6.0
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
sprite_frames = ExtResource("2_i2plx")
|
sprite_frames = ExtResource("2_i2plx")
|
||||||
109
Scenes/Actors/Fairy_New.tscn
Normal file
109
Scenes/Actors/Fairy_New.tscn
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
[gd_scene load_steps=19 format=3 uid="uid://dfat0erkvb513"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/Actor.cs" id="1_p2pib"]
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://bcc5mlwwnkvri" path="res://Resources/Sprites/Fairy.tres" id="2_ycldt"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/EnemyPossessionMovement.cs" id="3_bwdr1"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="4_5uoep"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/FourWayAnimationHandler.cs" id="5_6u5xg"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/ActorAi.cs" id="6_3slbl"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/EnemyNavigationMovement.cs" id="7_vtg4i"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/ProximityPlayerDetection.cs" id="8_j0gdf"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="9_4h871"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cj63k0dmk7tl1" path="res://Scenes/Weapons/enemy_weapon_base.tscn" id="10_nc74c"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="11_ksqei"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/DamageReceiverActorModule.cs" id="12_ubjf1"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/DeathAnimationHandler.cs" id="13_pc4bh"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dk2rbf88a5irh" path="res://Resources/Bullets/Explosion_Harmless.tres" id="14_bjjn4"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Components/Actors/ActorDefeatScriptHandler.cs" id="15_t4y0s"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2b36v"]
|
||||||
|
radius = 5.0
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_sthwe"]
|
||||||
|
radius = 85.0529
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
|
||||||
|
radius = 5.09902
|
||||||
|
|
||||||
|
[node name="Fairy" type="CharacterBody2D"]
|
||||||
|
collision_layer = 16
|
||||||
|
collision_mask = 113
|
||||||
|
script = ExtResource("1_p2pib")
|
||||||
|
MovementSpeed = 30.0
|
||||||
|
Health = 6.0
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
|
sprite_frames = ExtResource("2_ycldt")
|
||||||
|
animation = &"down"
|
||||||
|
|
||||||
|
[node name="MovementProvider" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("3_bwdr1")
|
||||||
|
|
||||||
|
[node name="InputProvider" type="Node2D" parent="MovementProvider"]
|
||||||
|
script = ExtResource("4_5uoep")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource("CircleShape2D_2b36v")
|
||||||
|
|
||||||
|
[node name="AnimationHandler" type="Node2D" parent="." node_paths=PackedStringArray("_animatedSprite")]
|
||||||
|
script = ExtResource("5_6u5xg")
|
||||||
|
_animatedSprite = NodePath("../AnimatedSprite2D")
|
||||||
|
|
||||||
|
[node name="ActorAi" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("6_3slbl")
|
||||||
|
Ai = 0
|
||||||
|
|
||||||
|
[node name="NavigationMovementProvider" type="Node2D" parent="." node_paths=PackedStringArray("EquippedWeapon", "_playerDetection")]
|
||||||
|
script = ExtResource("7_vtg4i")
|
||||||
|
_navigationEnabled = true
|
||||||
|
CollisionMask = 81
|
||||||
|
EquippedWeapon = NodePath("../EnemyWeapon")
|
||||||
|
_playerDetection = NodePath("../PlayerDetection")
|
||||||
|
|
||||||
|
[node name="PlayerDetection" type="Area2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 2
|
||||||
|
script = ExtResource("8_j0gdf")
|
||||||
|
|
||||||
|
[node name="PlayerDetectionArea" type="CollisionShape2D" parent="PlayerDetection"]
|
||||||
|
shape = SubResource("CircleShape2D_sthwe")
|
||||||
|
|
||||||
|
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||||
|
target_desired_distance = 64.0
|
||||||
|
path_max_distance = 800.0
|
||||||
|
path_postprocessing = 1
|
||||||
|
avoidance_enabled = true
|
||||||
|
debug_path_custom_color = Color(1, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="HealthProvider" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("9_4h871")
|
||||||
|
ResourceName = "Health"
|
||||||
|
MaxResource = 6.0
|
||||||
|
|
||||||
|
[node name="EnemyWeapon" parent="." instance=ExtResource("10_nc74c")]
|
||||||
|
WeaponData = ExtResource("11_ksqei")
|
||||||
|
|
||||||
|
[node name="DamageReceiver" type="Node2D" parent="." node_paths=PackedStringArray("HealthProvider")]
|
||||||
|
script = ExtResource("12_ubjf1")
|
||||||
|
HealthProvider = NodePath("../HealthProvider")
|
||||||
|
BulletGroup = 2
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="DamageReceiver"]
|
||||||
|
collision_layer = 16
|
||||||
|
collision_mask = 8
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageReceiver/Area2D"]
|
||||||
|
shape = SubResource("CircleShape2D_0tkae")
|
||||||
|
|
||||||
|
[node name="DeathAnimation" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("13_pc4bh")
|
||||||
|
ExplosionData = ExtResource("14_bjjn4")
|
||||||
|
|
||||||
|
[node name="DefeatScriptHandler" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("15_t4y0s")
|
||||||
|
|
||||||
|
[connection signal="area_entered" from="PlayerDetection" to="PlayerDetection" method="_on_area_entered"]
|
||||||
|
[connection signal="area_exited" from="PlayerDetection" to="PlayerDetection" method="_on_area_exited"]
|
||||||
|
[connection signal="velocity_computed" from="NavigationAgent2D" to="NavigationMovementProvider" method="_on_navigation_agent_2d_velocity_computed"]
|
||||||
|
[connection signal="area_entered" from="DamageReceiver/Area2D" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
[ext_resource type="Script" path="res://Scenes/CameraController.gd" id="7_4a7df"]
|
[ext_resource type="Script" path="res://Scenes/CameraController.gd" id="7_4a7df"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b0gpbkxdfbnjh" path="res://Scenes/Actors/ForceField_Horizontal.tscn" id="8_5cbgu"]
|
[ext_resource type="PackedScene" uid="uid://b0gpbkxdfbnjh" path="res://Scenes/Actors/ForceField_Horizontal.tscn" id="8_5cbgu"]
|
||||||
[ext_resource type="Script" path="res://Scripts/InventoryManager.cs" id="8_scbgd"]
|
[ext_resource type="Script" path="res://Scripts/InventoryManager.cs" id="8_scbgd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bc054js8ep2b" path="res://Scenes/Actors/4WayActorEnemyTest.tscn" id="8_vi7eu"]
|
[ext_resource type="PackedScene" uid="uid://bc054js8ep2b" path="res://Scenes/Actors/FairyGuard_New.tscn" id="8_vi7eu"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cd36ch65jijg0" path="res://Scenes/Activable/BulletEmitter.tscn" id="9_tniww"]
|
[ext_resource type="PackedScene" uid="uid://cd36ch65jijg0" path="res://Scenes/Activable/BulletEmitter.tscn" id="9_tniww"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dkwi1hu1bixoe" path="res://Scenes/HUD/HUD.tscn" id="9_xs7rn"]
|
[ext_resource type="PackedScene" uid="uid://dkwi1hu1bixoe" path="res://Scenes/HUD/HUD.tscn" id="9_xs7rn"]
|
||||||
[ext_resource type="Script" path="res://Scenes/CameraTarget.gd" id="10_86lpq"]
|
[ext_resource type="Script" path="res://Scenes/CameraTarget.gd" id="10_86lpq"]
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,6 @@ void fragment() {
|
||||||
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
graph_offset = Vector2(-6.8877, 111.307)
|
|
||||||
mode = 1
|
mode = 1
|
||||||
flags/light_only = false
|
flags/light_only = false
|
||||||
nodes/fragment/0/position = Vector2(2960, 500)
|
nodes/fragment/0/position = Vector2(2960, 500)
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -6,7 +6,10 @@ using Godot;
|
||||||
public partial class Actor : CharacterBody2D
|
public partial class Actor : CharacterBody2D
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
public float MovementSpeed { get; private set; }
|
public float MovementSpeed { get; private set; } = 20f;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public float Health { get; private set; } = 4f;
|
||||||
|
|
||||||
[ExportCategory("Defeat Script")]
|
[ExportCategory("Defeat Script")]
|
||||||
[Export] public Node2D DefeatScript { get; set; }
|
[Export] public Node2D DefeatScript { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ public partial class DamageReceiverActorModule : ActorModule
|
||||||
{
|
{
|
||||||
_actor = actor;
|
_actor = actor;
|
||||||
|
|
||||||
|
this.HealthProvider.MaxResource = actor.Health;
|
||||||
|
|
||||||
HealthProvider.FillResource();
|
HealthProvider.FillResource();
|
||||||
HealthProvider.ResourceDepleted += OnDeath;
|
HealthProvider.ResourceDepleted += OnDeath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@ void fragment() {
|
||||||
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
graph_offset = Vector2(-10.9562, 180.832)
|
|
||||||
mode = 1
|
mode = 1
|
||||||
flags/light_only = false
|
flags/light_only = false
|
||||||
nodes/fragment/0/position = Vector2(2520, 280)
|
nodes/fragment/0/position = Vector2(2520, 280)
|
||||||
|
|
|
||||||
BIN
Tilesets/factory.aseprite
(Stored with Git LFS)
BIN
Tilesets/factory.aseprite
(Stored with Git LFS)
Binary file not shown.
BIN
Tilesets/factory.png
(Stored with Git LFS)
BIN
Tilesets/factory.png
(Stored with Git LFS)
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue