mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 06:45:33 +00:00
Shrouds
This commit is contained in:
parent
36c050f112
commit
8d1c0beadc
6 changed files with 116 additions and 3 deletions
12
Scenes/Activable/Shroud.tscn
Normal file
12
Scenes/Activable/Shroud.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://c21m7w5ahpsd0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://m32iqs21np0v" path="res://Sprites/BlackPixel.png" id="1_oowkm"]
|
||||
[ext_resource type="Script" path="res://Scripts/Activables/BlackCover.cs" id="2_qxoar"]
|
||||
|
||||
[node name="Shroud" type="Sprite2D"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
position = Vector2(-920.5, 78.75)
|
||||
scale = Vector2(127, 126.5)
|
||||
texture = ExtResource("1_oowkm")
|
||||
script = ExtResource("2_qxoar")
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=88 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=90 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"]
|
||||
|
|
@ -73,6 +73,8 @@
|
|||
[ext_resource type="PackedScene" uid="uid://bc054js8ep2b" path="res://Scenes/Actors/FairyGuard_New.tscn" id="73_cfpaq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bdvj4cxnyr3w4" path="res://Scenes/Actors/Thermathron.tscn" id="73_ier4h"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfat0erkvb513" path="res://Scenes/Actors/Fairy_New.tscn" id="73_s4x1s"]
|
||||
[ext_resource type="Texture2D" uid="uid://m32iqs21np0v" path="res://Sprites/BlackPixel.png" id="74_ra850"]
|
||||
[ext_resource type="Script" path="res://Scripts/Activables/BlackCover.cs" id="75_jy7lo"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6sau4"]
|
||||
script = ExtResource("7_l32kg")
|
||||
|
|
@ -142,7 +144,7 @@ ActivationType = 0
|
|||
Targets = Array[NodePath]([NodePath("../Rumia")])
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_r3s0t"]
|
||||
[sub_resource type="Resource" id="Resource_x6ymb"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("49_0si7g")
|
||||
Target = NodePath(".")
|
||||
|
|
@ -685,7 +687,7 @@ Events = Array[Object]([SubResource("Resource_068l7"), SubResource("Resource_l3n
|
|||
|
||||
[node name="BossBattleStartScript" parent="." instance=ExtResource("43_kf3qc")]
|
||||
position = Vector2(-1487, -396)
|
||||
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_r3s0t")])
|
||||
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_x6ymb")])
|
||||
|
||||
[node name="Enemy13" parent="." instance=ExtResource("47_u1ve6")]
|
||||
position = Vector2(-1657, -788)
|
||||
|
|
@ -749,3 +751,11 @@ position = Vector2(-1010, 203)
|
|||
[node name="FairyGuard8" parent="." instance=ExtResource("73_ier4h")]
|
||||
position = Vector2(-581, -346)
|
||||
StartingAiState = 1
|
||||
|
||||
[node name="Shroud" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
z_index = 1
|
||||
position = Vector2(-920.5, 78.75)
|
||||
scale = Vector2(127, 126.5)
|
||||
texture = ExtResource("74_ra850")
|
||||
script = ExtResource("75_jy7lo")
|
||||
|
|
|
|||
51
Scripts/Activables/BlackCover.cs
Normal file
51
Scripts/Activables/BlackCover.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Activables;
|
||||
|
||||
public partial class BlackCover : Sprite2D, IActivable
|
||||
{
|
||||
[Export]
|
||||
public bool StartActive { get; private set; } = true;
|
||||
|
||||
private bool _activated;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_activated = StartActive;
|
||||
}
|
||||
|
||||
public void Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
switch (activationType)
|
||||
{
|
||||
case ActivationType.Use:
|
||||
case ActivationType.Toggle:
|
||||
_activated = !_activated;
|
||||
break;
|
||||
case ActivationType.Close:
|
||||
case ActivationType.Enable:
|
||||
_activated = true;
|
||||
break;
|
||||
case ActivationType.Open:
|
||||
case ActivationType.Disable:
|
||||
_activated = false;
|
||||
break;
|
||||
case ActivationType.Destroy:
|
||||
break;
|
||||
}
|
||||
UpdateSprite();
|
||||
}
|
||||
|
||||
private void UpdateSprite()
|
||||
{
|
||||
if (_activated)
|
||||
{
|
||||
this.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Sprites/BlackPixel.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/BlackPixel.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/BlackPixel.png
(Stored with Git LFS)
Normal file
BIN
Sprites/BlackPixel.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/BlackPixel.png.import
Normal file
34
Sprites/BlackPixel.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://m32iqs21np0v"
|
||||
path="res://.godot/imported/BlackPixel.png-2c98508c3f25ebc75e56632986669add.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/BlackPixel.png"
|
||||
dest_files=["res://.godot/imported/BlackPixel.png-2c98508c3f25ebc75e56632986669add.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