revolutionnnnn
This commit is contained in:
parent
bb912bf3ce
commit
400f3482a7
36
endings/revolution.cs
Normal file
36
endings/revolution.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class revolution : Control
|
||||
{
|
||||
|
||||
[Export]
|
||||
private Timer _timer;
|
||||
[Export]
|
||||
private ColorRect _fade;
|
||||
[Export]
|
||||
private float fadeRate = 0.1f;
|
||||
private float alpha = 1f;
|
||||
private bool isReverse = false;
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_timer.Timeout += goToEnd;
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
alpha -= fadeRate * (float)delta;
|
||||
|
||||
_fade.Color = new Color(0, 0, 0, alpha);
|
||||
}
|
||||
|
||||
private void goToEnd()
|
||||
{
|
||||
var scene = GD.Load<PackedScene>("res://endings/the_end.tscn");
|
||||
var instance = scene.Instantiate();
|
||||
GetNode<Node>("/root/").AddChild(instance);
|
||||
this.QueueFree();
|
||||
}
|
||||
}
|
82
endings/revolution.tscn
Normal file
82
endings/revolution.tscn
Normal file
@ -0,0 +1,82 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ppfkr7umi7vs"]
|
||||
|
||||
[ext_resource type="Script" path="res://endings/revolution.cs" id="1_d8ssh"]
|
||||
[ext_resource type="Texture2D" uid="uid://ban2kwe2xntfj" path="res://images/Riot.jpg" id="1_lojuk"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_bdmkb"]
|
||||
font_size = 36
|
||||
font_color = Color(0.847059, 0.847059, 0.847059, 1)
|
||||
|
||||
[node name="revolution" type="Control" node_paths=PackedStringArray("_timer", "_fade")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_d8ssh")
|
||||
_timer = NodePath("Timer")
|
||||
_fade = NodePath("Fade")
|
||||
fadeRate = 0.3
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
self_modulate = Color(0.407843, 0.407843, 0.407843, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("1_lojuk")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -11.5
|
||||
offset_right = 20.0
|
||||
offset_bottom = 11.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "Your population has risen against you"
|
||||
label_settings = SubResource("LabelSettings_bdmkb")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 29.0
|
||||
offset_top = -98.0
|
||||
offset_right = 991.0
|
||||
offset_bottom = 8.0
|
||||
grow_vertical = 0
|
||||
scale = Vector2(0.745013, 0.745013)
|
||||
text = "“One has a moral responsibility to disobey unjust laws.”
|
||||
― Martin Luther King Jr. "
|
||||
label_settings = SubResource("LabelSettings_bdmkb")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Fade" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 10.0
|
||||
one_shot = true
|
||||
autostart = true
|
BIN
images/Riot.jpg
Normal file
BIN
images/Riot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 355 KiB |
Loading…
Reference in New Issue
Block a user