mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Added camera
This commit is contained in:
parent
d5d3b7310a
commit
861bcef4dd
10 changed files with 363 additions and 29 deletions
286
Scenes/Actors/Camera.tscn
Normal file
286
Scenes/Actors/Camera.tscn
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
[gd_scene load_steps=37 format=3 uid="uid://c27co22bjym3c"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Actors/Camera.cs" id="1_2qb38"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpuffmksk41n4" path="res://Sprites/Actors/Camera.png" id="1_l5lfg"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1cxu1"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bi4kn"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qgntu"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0xn7d"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5xbm6"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oxghg"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6e5gf"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dxl8p"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d0i3t"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oy0eq"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_14w2k"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_m2si1"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lbhml"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rw7h1"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_x62ns"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_unrcw"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y5qth"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qkmcw"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_myuwn"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8aa11"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u7xyi"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qrkj0"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qcqm5"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_34faw"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j34h0"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ojvts"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kf402"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aaebm"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_owve1"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0eww4"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0pie4"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oh7bx"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vxoib"]
|
||||
atlas = ExtResource("1_l5lfg")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_dvf56"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1cxu1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bi4kn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qgntu")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"center_to_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0xn7d")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5xbm6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_oxghg")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"center_to_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6e5gf")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dxl8p")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_d0i3t")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_oy0eq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_14w2k")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_m2si1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lbhml")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rw7h1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_x62ns")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_unrcw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_y5qth")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"full_scan",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qkmcw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_myuwn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8aa11")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"left_to_center",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_u7xyi")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qrkj0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qcqm5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_34faw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j34h0")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"left_to_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ojvts")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kf402")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_aaebm")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"right_to_center",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_owve1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0eww4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0pie4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_oh7bx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vxoib")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"right_to_left",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="Camera" type="Node2D"]
|
||||
script = ExtResource("1_2qb38")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_dvf56")
|
||||
animation = &"full_scan"
|
||||
frame_progress = 0.779565
|
||||
|
|
@ -26,10 +26,8 @@ animations = [{
|
|||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="HUD" type="CanvasLayer" node_paths=PackedStringArray("_healthLabel", "_itemsContainer")]
|
||||
[node name="HUD" type="CanvasLayer"]
|
||||
script = ExtResource("1_m0hb0")
|
||||
_healthLabel = NodePath("VBoxContainer/HealthLabel")
|
||||
_itemsContainer = NodePath("VBoxContainer/ItemsContainer")
|
||||
|
||||
[node name="GameOver" type="Label" parent="."]
|
||||
visible = false
|
||||
|
|
@ -76,6 +74,3 @@ text = "100/100"
|
|||
|
||||
[node name="ItemsContainer" type="VBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/ItemsContainer"]
|
||||
layout_mode = 2
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
16
Scripts/Actors/Camera.cs
Normal file
16
Scripts/Actors/Camera.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Camera : Node2D
|
||||
{
|
||||
|
||||
private AnimatedSprite2D _sprite;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_sprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
|
||||
|
||||
_sprite.Play("full_scan");
|
||||
}
|
||||
|
||||
}
|
||||
BIN
Sprites/Actors/Camera.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/Actors/Camera.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/Actors/Camera.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Actors/Camera.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Actors/Camera.png.import
Normal file
34
Sprites/Actors/Camera.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpuffmksk41n4"
|
||||
path="res://.godot/imported/Camera.png-ab1d575d0970b2613a7d48734afd25f8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Actors/Camera.png"
|
||||
dest_files=["res://.godot/imported/Camera.png-ab1d575d0970b2613a7d48734afd25f8.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
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.
|
|
@ -1,7 +1,8 @@
|
|||
[gd_resource type="TileSet" load_steps=24 format=3 uid="uid://6k28roiljylj"]
|
||||
[gd_resource type="TileSet" load_steps=25 format=3 uid="uid://6k28roiljylj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://tphqodqyere1" path="res://Tilesets/factory.png" id="1_70kxh"]
|
||||
[ext_resource type="PackedScene" uid="uid://bj28qiai2x2ar" path="res://Scenes/Props/Barrel.tscn" id="2_cxg4b"]
|
||||
[ext_resource type="PackedScene" uid="uid://c27co22bjym3c" path="res://Scenes/Actors/Camera.tscn" id="3_fhx8p"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgk7fgwiis425" path="res://Scenes/Props/Box_Red.tscn" id="3_hrh63"]
|
||||
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="4_brv02"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqq3q37hugdlj" path="res://Scenes/Door.tscn" id="5_1xipm"]
|
||||
|
|
@ -282,6 +283,7 @@ scenes/6/scene = ExtResource("7_k6a3n")
|
|||
scenes/7/scene = ExtResource("8_vuaww")
|
||||
scenes/8/scene = ExtResource("9_wc4jy")
|
||||
scenes/9/scene = ExtResource("10_hg2bp")
|
||||
scenes/10/scene = ExtResource("3_fhx8p")
|
||||
|
||||
[resource]
|
||||
physics_layer_0/collision_layer = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue