diff options
author | kdx <kikoodx@paranoici.org> | 2023-10-29 01:43:24 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-10-29 01:43:24 +0200 |
commit | 4bb301f694b958316b628fd55c84a12b616c310e (patch) | |
tree | 41fb91d69d4a941e40212806e00bdae648e73b05 | |
parent | 98f6cf85e895ea611f97f59eb8f3ea325b485016 (diff) | |
download | genshin2-4bb301f694b958316b628fd55c84a12b616c310e.tar.gz |
i'm stupid and i'm sleeping
-rw-r--r-- | ColorRect.gd | 7 | ||||
-rw-r--r-- | Genshinlogo.gd | 14 | ||||
-rw-r--r-- | Globals.gd | 1 | ||||
-rw-r--r-- | UI.gd | 11 | ||||
-rw-r--r-- | characters.gd | 2 | ||||
-rw-r--r-- | checkbox.gd | 13 | ||||
-rw-r--r-- | checkbox.png | bin | 0 -> 831 bytes | |||
-rw-r--r-- | checkbox.png.import | 34 | ||||
-rw-r--r-- | checkbox.tscn | 20 | ||||
-rw-r--r-- | game.tscn | 23 | ||||
-rw-r--r-- | player.gd | 3 |
11 files changed, 117 insertions, 11 deletions
diff --git a/ColorRect.gd b/ColorRect.gd index b20652d..5049898 100644 --- a/ColorRect.gd +++ b/ColorRect.gd @@ -3,11 +3,14 @@ extends ColorRect # Called when the node enters the scene tree for the first time. func _ready() -> void: - pass # Replace with function body. + pass # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(_delta: float) -> void: - color.r = randi_range(0, 1) + if !Globals.FUN: + color.r = 0 + else: + color.r = randi_range(0, 1) color.g = color.r color.b = color.r diff --git a/Genshinlogo.gd b/Genshinlogo.gd index 9ac3779..9591152 100644 --- a/Genshinlogo.gd +++ b/Genshinlogo.gd @@ -8,7 +8,13 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - rotation += delta * 20 - modulate.r = randi_range(0, 1) - modulate.g = randi_range(0, 1) - modulate.b = randi_range(0, 1) + if !Globals.FUN: + rotation = 0 + modulate.r = 1 + modulate.g = 1 + modulate.b = 1 + else: + rotation += delta * 20 + modulate.r = randi_range(0, 1) + modulate.g = randi_range(0, 1) + modulate.b = randi_range(0, 1) @@ -5,3 +5,4 @@ const HEIGHT = 2048 const LIMITS = Vector2(WIDTH, HEIGHT) const LIMITS_MIN = -LIMITS / 2 const LIMITS_MAX = LIMITS / 2 +var FUN = false @@ -0,0 +1,11 @@ +extends Control + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + Globals.FUN = $Checkbox.state diff --git a/characters.gd b/characters.gd index 72aabf4..ca4c368 100644 --- a/characters.gd +++ b/characters.gd @@ -31,5 +31,3 @@ func select() -> void: func _new_selection(s: String) -> void: selected = (s == label) - if selected: - get_node("../../../Player").select_character(label) diff --git a/checkbox.gd b/checkbox.gd new file mode 100644 index 0000000..8ed4cb7 --- /dev/null +++ b/checkbox.gd @@ -0,0 +1,13 @@ +extends Sprite2D + +@export var state = false + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(_delta: float) -> void: + frame = 1 if state else 0 + + +func _on_button_pressed() -> void: + state = !state + print("press") diff --git a/checkbox.png b/checkbox.png Binary files differnew file mode 100644 index 0000000..df7c175 --- /dev/null +++ b/checkbox.png diff --git a/checkbox.png.import b/checkbox.png.import new file mode 100644 index 0000000..ebfa227 --- /dev/null +++ b/checkbox.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqpprk271vdnq" +path="res://.godot/imported/checkbox.png-eaeb4152c33462c8f3102cccdd960dc9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://checkbox.png" +dest_files=["res://.godot/imported/checkbox.png-eaeb4152c33462c8f3102cccdd960dc9.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 diff --git a/checkbox.tscn b/checkbox.tscn new file mode 100644 index 0000000..249b76d --- /dev/null +++ b/checkbox.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=3 format=3 uid="uid://opbr0q2e2rex"] + +[ext_resource type="Texture2D" uid="uid://cqpprk271vdnq" path="res://checkbox.png" id="1_rqra1"] +[ext_resource type="Script" path="res://checkbox.gd" id="2_1btp4"] + +[node name="Checkbox" type="Sprite2D"] +texture_filter = 1 +texture = ExtResource("1_rqra1") +hframes = 2 +script = ExtResource("2_1btp4") +metadata/_edit_group_ = true + +[node name="Button" type="Button" parent="."] +modulate = Color(1, 1, 1, 0) +offset_left = -8.0 +offset_top = -8.0 +offset_right = 8.0 +offset_bottom = 8.0 + +[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] @@ -1,13 +1,16 @@ -[gd_scene load_steps=12 format=3 uid="uid://8ps5533ot84q"] +[gd_scene load_steps=16 format=3 uid="uid://8ps5533ot84q"] [ext_resource type="PackedScene" uid="uid://c2g45v321qddb" path="res://player.tscn" id="1_3q46r"] [ext_resource type="Script" path="res://ColorRect.gd" id="1_kv47q"] [ext_resource type="Texture2D" uid="uid://hqxnw5bd6q2c" path="res://genshinlogo.png" id="1_tfg20"] [ext_resource type="Script" path="res://Genshinlogo.gd" id="2_8h31p"] [ext_resource type="FontFile" uid="uid://dgekwkwx0o0os" path="res://Ginga.ttf" id="2_63wkf"] +[ext_resource type="Script" path="res://UI.gd" id="2_keird"] [ext_resource type="PackedScene" uid="uid://bj48tpvf86kjo" path="res://coin.tscn" id="2_qfcfl"] [ext_resource type="Script" path="res://Primogemmes.gd" id="3_06iw8"] [ext_resource type="PackedScene" uid="uid://g8m1imvs0g1t" path="res://characters.tscn" id="5_cbcae"] +[ext_resource type="PackedScene" uid="uid://opbr0q2e2rex" path="res://checkbox.tscn" id="6_mpv26"] +[ext_resource type="FontFile" uid="uid://dy3o3bbglibkp" path="res://comicsans.ttf" id="8_wylah"] [ext_resource type="AudioStream" uid="uid://c7pa506xccdyq" path="res://ost.ogg" id="9_bhhfh"] [ext_resource type="Texture2D" uid="uid://wvfljynswg5y" path="res://windaube.png" id="9_tsf5s"] @@ -15,6 +18,10 @@ font = ExtResource("2_63wkf") font_size = 128 +[sub_resource type="LabelSettings" id="LabelSettings_u6313"] +font = ExtResource("8_wylah") +font_size = 48 + [node name="Game" type="Node2D"] [node name="ColorRect" type="ColorRect" parent="."] @@ -44,6 +51,7 @@ layout_mode = 3 anchors_preset = 0 offset_right = 1280.0 offset_bottom = 960.0 +script = ExtResource("2_keird") [node name="Primogemmes" type="Label" parent="CanvasUI/UI"] layout_mode = 1 @@ -66,7 +74,6 @@ texture = ExtResource("9_tsf5s") [node name="Characters" parent="CanvasUI/UI" instance=ExtResource("5_cbcae")] position = Vector2(1280, 320) -label = "venti" key = "1" [node name="Characters2" parent="CanvasUI/UI" instance=ExtResource("5_cbcae")] @@ -84,6 +91,18 @@ position = Vector2(1281, 559) label = "" key = "4" +[node name="Checkbox" parent="CanvasUI/UI" instance=ExtResource("6_mpv26")] +position = Vector2(64, 897) +scale = Vector2(4, 4) + +[node name="Label" type="Label" parent="CanvasUI/UI"] +offset_left = 111.0 +offset_top = 855.0 +offset_right = 318.0 +offset_bottom = 881.0 +text = "epilepsy warning: fun toggle" +label_settings = SubResource("LabelSettings_u6313") + [node name="Genshinlogo" type="Sprite2D" parent="."] texture = ExtResource("1_tfg20") script = ExtResource("2_8h31p") @@ -11,7 +11,8 @@ func type() -> String: return "player" # Called when the node enters the scene tree for the first time. func _ready() -> void: - pass + SignalHub.select_character.connect(select_character) + select_character("venti") func get_input() -> Vector2: |