mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 06:45:33 +00:00
Red keycard base
This commit is contained in:
parent
396853f29a
commit
14893a544b
14 changed files with 291 additions and 19 deletions
126
Scenes/Door_Horizontal.tscn
Normal file
126
Scenes/Door_Horizontal.tscn
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
[gd_scene load_steps=16 format=3 uid="uid://l84on3kv2s52"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Door.cs" id="1_emfh4"]
|
||||
[ext_resource type="Texture2D" uid="uid://desg0e2phtw50" path="res://Sprites/HorizontalDoor.png" id="2_rnx3o"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_awtxv"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ocjdv"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 96, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_we0if"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 64, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_em3e7"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fehs4"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g8abm"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 96, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t3pwa"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 96, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wvr8p"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 64, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o1fq1"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8tyvt"]
|
||||
atlas = ExtResource("2_rnx3o")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_keeml"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_awtxv")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"Closed",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ocjdv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_we0if")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_em3e7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fehs4")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"Closing",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g8abm")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"Open",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t3pwa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wvr8p")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_o1fq1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8tyvt")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"Opening",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0wg11"]
|
||||
size = Vector2(32, 32)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_f2rl6"]
|
||||
size = Vector2(32, 32)
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
collision_layer = 64
|
||||
collision_mask = 154
|
||||
script = ExtResource("1_emfh4")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_keeml")
|
||||
animation = &"Opening"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_0wg11")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
shape = SubResource("RectangleShape2D_f2rl6")
|
||||
|
||||
[connection signal="animation_changed" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_changed"]
|
||||
|
|
@ -5,16 +5,6 @@ using System.Diagnostics;
|
|||
public partial class Interactable : Area2D
|
||||
{
|
||||
[Export] public Activable Target { get; set; }
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
public void Activate()
|
||||
{
|
||||
|
|
|
|||
21
Scenes/Red_Keycard.tscn
Normal file
21
Scenes/Red_Keycard.tscn
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dxs3ks2ucaxl4"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scenes/Interactable.cs" id="1_8ev2v"]
|
||||
[ext_resource type="Texture2D" uid="uid://c53bchw2krocb" path="res://Sprites/Red_Keycard.png" id="2_onmup"]
|
||||
[ext_resource type="Script" path="res://Scripts/Pickupper.cs" id="3_t6rqq"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_x0adl"]
|
||||
|
||||
[node name="ControlPad" type="Area2D" groups=["Interactable"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_8ev2v")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_x0adl")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_onmup")
|
||||
|
||||
[node name="Pickupper" type="Node2D" parent="."]
|
||||
script = ExtResource("3_t6rqq")
|
||||
File diff suppressed because one or more lines are too long
28
Scripts/InventoryManager.cs
Normal file
28
Scripts/InventoryManager.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class InventoryManager : Node2D
|
||||
{
|
||||
|
||||
public bool RedKeycard { get; set; }
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRedKeycard()
|
||||
{
|
||||
RedKeycard = true;
|
||||
}
|
||||
|
||||
public void RemoveRedKeycard()
|
||||
{
|
||||
RedKeycard = false;
|
||||
}
|
||||
}
|
||||
11
Scripts/Pickupper.cs
Normal file
11
Scripts/Pickupper.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Pickupper : Activable
|
||||
{
|
||||
|
||||
public override void Activate()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
BIN
Sprites/HorizontalDoor.aseprite
(Stored with Git LFS)
BIN
Sprites/HorizontalDoor.aseprite
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/HorizontalDoor.png
(Stored with Git LFS)
BIN
Sprites/HorizontalDoor.png
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/Red_Card_Reader.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/Red_Card_Reader.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/Red_Card_Reader.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Red_Card_Reader.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Red_Card_Reader.png.import
Normal file
34
Sprites/Red_Card_Reader.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ch6nbhxgxxtf"
|
||||
path="res://.godot/imported/Red_Card_Reader.png-77eecea3efb9978d63a71cd9d80655b5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Red_Card_Reader.png"
|
||||
dest_files=["res://.godot/imported/Red_Card_Reader.png-77eecea3efb9978d63a71cd9d80655b5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Sprites/Red_Keycard.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/Red_Keycard.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/Red_Keycard.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Red_Keycard.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Red_Keycard.png.import
Normal file
34
Sprites/Red_Keycard.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c53bchw2krocb"
|
||||
path="res://.godot/imported/Red_Keycard.png-7f9cf4493849e82909f4ce8620a31123.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Red_Keycard.png"
|
||||
dest_files=["res://.godot/imported/Red_Keycard.png-7f9cf4493849e82909f4ce8620a31123.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Loading…
Add table
Add a link
Reference in a new issue