mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-19 03:33:48 +00:00
Mainframe
This commit is contained in:
parent
fc833ae300
commit
a13355be42
16 changed files with 369 additions and 13 deletions
|
|
@ -6,6 +6,7 @@ using Cirno.Scripts.Resources;
|
|||
|
||||
public partial class Barrel : Area2D, IDestructible
|
||||
{
|
||||
[Export] public bool Indestructible { get; private set; }
|
||||
[Export] public float Health = 1f;
|
||||
|
||||
[Export] public float ExplosionRadius = 1;
|
||||
|
|
@ -132,7 +133,7 @@ public partial class Barrel : Area2D, IDestructible
|
|||
|
||||
public void Hit(float damage, DamageType damageType = DamageType.Neutral)
|
||||
{
|
||||
if (_isDestroyed) return;
|
||||
if (_isDestroyed || Indestructible) return;
|
||||
|
||||
_currentHealth -= damage;
|
||||
if (_currentHealth > 0) return;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=19 format=4 uid="uid://bx31ou6tw3kd1"]
|
||||
[gd_scene load_steps=21 format=4 uid="uid://bx31ou6tw3kd1"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_jpse7"]
|
||||
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_4hnih"]
|
||||
|
|
@ -16,6 +16,8 @@
|
|||
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="6_tf4ep"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/Events/DialogueStartEvent.cs" id="7_u7oae"]
|
||||
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="9_700kw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cke02i4e3bxld" path="res://Scenes/Props/MainFrame2.tscn" id="17_u3bx7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqrkisw6jg24w" path="res://Scenes/Props/MainFrame1.tscn" id="18_27jx1"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_53p3c"]
|
||||
script = ExtResource("4_ls56o")
|
||||
|
|
@ -111,3 +113,15 @@ position = Vector2(111, 305)
|
|||
|
||||
[node name="AlarmManager" type="Node2D" parent="."]
|
||||
script = ExtResource("6_m31cm")
|
||||
|
||||
[node name="Mainframe2" parent="." instance=ExtResource("17_u3bx7")]
|
||||
position = Vector2(275, 511)
|
||||
|
||||
[node name="Mainframe" parent="." instance=ExtResource("18_27jx1")]
|
||||
position = Vector2(248, 511)
|
||||
|
||||
[node name="Mainframe3" parent="." instance=ExtResource("18_27jx1")]
|
||||
position = Vector2(264, 511)
|
||||
|
||||
[node name="Mainframe4" parent="." instance=ExtResource("18_27jx1")]
|
||||
position = Vector2(287, 511)
|
||||
|
|
|
|||
60
Scenes/Props/MainFrame1.tscn
Normal file
60
Scenes/Props/MainFrame1.tscn
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://cqrkisw6jg24w"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scenes/Barrel.cs" id="1_503tw"]
|
||||
[ext_resource type="Texture2D" uid="uid://dq8wg0n5q7b6b" path="res://Sprites/Props/MainFrame1.png" id="2_4mou8"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxvsefskms5kj" path="res://Scenes/Props/MainFrame1_Broken.tscn" id="2_pr6n8"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5da8j"]
|
||||
atlas = ExtResource("2_4mou8")
|
||||
region = Rect2(0, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mli0e"]
|
||||
atlas = ExtResource("2_4mou8")
|
||||
region = Rect2(16, 0, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_kpm16"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5da8j")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mli0e")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0nhpj"]
|
||||
size = Vector2(14, 24)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vguns"]
|
||||
size = Vector2(13, 20)
|
||||
|
||||
[node name="Mainframe" type="Area2D" groups=["Destroyable"]]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
script = ExtResource("1_503tw")
|
||||
Health = 8.0
|
||||
ExplosionRadius = 0.0
|
||||
ExplosionDamage = 0.0
|
||||
DebrisScene = ExtResource("2_pr6n8")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_kpm16")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.193815
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_0nhpj")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
position = Vector2(0.5, -3)
|
||||
shape = SubResource("RectangleShape2D_vguns")
|
||||
50
Scenes/Props/MainFrame1_Broken.tscn
Normal file
50
Scenes/Props/MainFrame1_Broken.tscn
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://bxvsefskms5kj"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scenes/Barrel.cs" id="1_ybt0d"]
|
||||
[ext_resource type="Texture2D" uid="uid://dq8wg0n5q7b6b" path="res://Sprites/Props/MainFrame1.png" id="2_ep53m"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h5128"]
|
||||
atlas = ExtResource("2_ep53m")
|
||||
region = Rect2(32, 0, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_qdal4"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h5128")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0nhpj"]
|
||||
size = Vector2(14, 24)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vguns"]
|
||||
size = Vector2(13, 20)
|
||||
|
||||
[node name="Mainframe" type="Area2D" groups=["Destroyable"]]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
script = ExtResource("1_ybt0d")
|
||||
Indestructible = true
|
||||
Health = 8.0
|
||||
ExplosionRadius = 0.0
|
||||
ExplosionDamage = 0.0
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_qdal4")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_0nhpj")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
position = Vector2(0.5, -3)
|
||||
shape = SubResource("RectangleShape2D_vguns")
|
||||
59
Scenes/Props/MainFrame2.tscn
Normal file
59
Scenes/Props/MainFrame2.tscn
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://cke02i4e3bxld"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scenes/Barrel.cs" id="1_ob786"]
|
||||
[ext_resource type="PackedScene" uid="uid://baye68t8ikn01" path="res://Scenes/Props/MainFrame2_Broken.tscn" id="2_o2ikx"]
|
||||
[ext_resource type="Texture2D" uid="uid://brpfyvd44r0ha" path="res://Sprites/Props/MainFrame2.png" id="2_y51ds"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ida3m"]
|
||||
atlas = ExtResource("2_y51ds")
|
||||
region = Rect2(0, 0, 8, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_iqtwx"]
|
||||
atlas = ExtResource("2_y51ds")
|
||||
region = Rect2(8, 0, 8, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_8ejte"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ida3m")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_iqtwx")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0nhpj"]
|
||||
size = Vector2(6, 24)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vguns"]
|
||||
size = Vector2(6, 20)
|
||||
|
||||
[node name="Mainframe2" type="Area2D" groups=["Destroyable"]]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
script = ExtResource("1_ob786")
|
||||
Health = 8.0
|
||||
ExplosionRadius = 0.0
|
||||
ExplosionDamage = 0.0
|
||||
DebrisScene = ExtResource("2_o2ikx")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_8ejte")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_0nhpj")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
position = Vector2(0, -3)
|
||||
shape = SubResource("RectangleShape2D_vguns")
|
||||
50
Scenes/Props/MainFrame2_Broken.tscn
Normal file
50
Scenes/Props/MainFrame2_Broken.tscn
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://baye68t8ikn01"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scenes/Barrel.cs" id="1_a45cr"]
|
||||
[ext_resource type="Texture2D" uid="uid://brpfyvd44r0ha" path="res://Sprites/Props/MainFrame2.png" id="2_moasd"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g5e65"]
|
||||
atlas = ExtResource("2_moasd")
|
||||
region = Rect2(16, 0, 8, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_modcc"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g5e65")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0nhpj"]
|
||||
size = Vector2(6, 24)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vguns"]
|
||||
size = Vector2(6, 20)
|
||||
|
||||
[node name="Mainframe2Broken" type="Area2D" groups=["Destroyable"]]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
script = ExtResource("1_a45cr")
|
||||
Indestructible = true
|
||||
Health = 8.0
|
||||
ExplosionRadius = 0.0
|
||||
ExplosionDamage = 0.0
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_modcc")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_0nhpj")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
position = Vector2(0, -3)
|
||||
shape = SubResource("RectangleShape2D_vguns")
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue