Compare commits
8 Commits
05ae47ecaf
...
feat-testi
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b5a35cca1 | |||
| 5bb9340963 | |||
| 613df07800 | |||
| 503b12d8eb | |||
| 01a7fe419a | |||
| 8fcfb31220 | |||
| ca3e924f4d | |||
| 57209d9290 |
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"conventionalCommits.scopes": [
|
"conventionalCommits.scopes": [
|
||||||
"ci/cd"
|
"ci/cd",
|
||||||
|
"recuration"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
16
Core/Singeltons/planets_singelton.gd
Normal file
16
Core/Singeltons/planets_singelton.gd
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
var planets: Array[Node] = []
|
||||||
|
|
||||||
|
|
||||||
|
func register(planet: Node) -> void:
|
||||||
|
planets.append(planet)
|
||||||
|
|
||||||
|
|
||||||
|
func unregister(planet) -> void:
|
||||||
|
planets.erase(planet)
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
if Time.get_ticks_msec() % 2000 < delta * 1000:
|
||||||
|
print_debug(JSON.stringify(planets, "\t"))
|
||||||
1
Core/Singeltons/planets_singelton.gd.uid
Normal file
1
Core/Singeltons/planets_singelton.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dhdnbucgojrv6
|
||||||
@@ -1 +1 @@
|
|||||||
extends Node2D
|
extends AbstractBody
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://o2egm85y3wul"]
|
[gd_scene format=3 uid="uid://o2egm85y3wul"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Experiments/Recuration/Assets/TheMoon/TheMoon.gd" id="1_sr6fy"]
|
[ext_resource type="Script" uid="uid://1c5nfdg2aud4" path="res://Experiments/Recuration/Assets/TheMoon/TheMoon.gd" id="1_sr6fy"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dng410xo7qqfv" path="res://Core/Assets/PixelPlanets/a-moon.png" id="2_oy8k5"]
|
[ext_resource type="Texture2D" uid="uid://dng410xo7qqfv" path="res://Core/Assets/PixelPlanets/a-moon.png" id="2_oy8k5"]
|
||||||
|
|
||||||
[node name="TheMoon" type="Node2D" unique_id=1994078602]
|
[node name="TheMoon" type="Node2D" unique_id=1994078602]
|
||||||
@@ -10,28 +10,3 @@ script = ExtResource("1_sr6fy")
|
|||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
texture_repeat = 1
|
texture_repeat = 1
|
||||||
texture = ExtResource("2_oy8k5")
|
texture = ExtResource("2_oy8k5")
|
||||||
|
|
||||||
[node name="Control" type="Control" parent="." unique_id=1752474701]
|
|
||||||
layout_mode = 3
|
|
||||||
anchors_preset = 0
|
|
||||||
offset_left = 20.0
|
|
||||||
offset_top = 20.0
|
|
||||||
offset_right = 20.0
|
|
||||||
offset_bottom = 20.0
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control" unique_id=61689214]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_right = 110.0
|
|
||||||
offset_bottom = 77.0
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Control/VBoxContainer" unique_id=1786036540]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Iron"
|
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="Control/VBoxContainer" unique_id=374559952]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Copper"
|
|
||||||
|
|
||||||
[node name="Label3" type="Label" parent="Control/VBoxContainer" unique_id=1739358724]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Copper"
|
|
||||||
|
|||||||
10
Experiments/Recuration/Assets/abstract_body.gd
Normal file
10
Experiments/Recuration/Assets/abstract_body.gd
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
class_name AbstractBody
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
PlanetsSingelton.register(self)
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_tree() -> void:
|
||||||
|
PlanetsSingelton.unregister(self)
|
||||||
1
Experiments/Recuration/Assets/abstract_body.gd.uid
Normal file
1
Experiments/Recuration/Assets/abstract_body.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://ds7qei5roqphg
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://pyvdyr3pes5o"
|
uid="uid://81isstkmpvtx"
|
||||||
path="res://.godot/imported/Movement 2D.svg-4fa99617f74c694e4d2141eda40271bc.ctex"
|
path="res://.godot/imported/Movement 2D.svg-4fa99617f74c694e4d2141eda40271bc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
[gd_scene format=3 uid="uid://cycayd4l7k7s4"]
|
[gd_scene format=3 uid="uid://cycayd4l7k7s4"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Experiments/Recuration/Scripts/RecurionCamera.gd" id="1_002bs"]
|
[ext_resource type="Script" uid="uid://bqslv86lm78ci" path="res://Experiments/Recuration/Scripts/RecurionCamera.gd" id="1_002bs"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cbqapc1frbhtv" path="res://Experiments/Recuration/UI/UI.tscn" id="2_qgdyp"]
|
[ext_resource type="PackedScene" uid="uid://cbqapc1frbhtv" path="res://Experiments/Recuration/UI/UI.tscn" id="2_qgdyp"]
|
||||||
|
[ext_resource type="Script" uid="uid://dhphpobeahiil" path="res://Experiments/Recuration/Scripts/CreatePlanet.gd" id="3_s7jin"]
|
||||||
[ext_resource type="PackedScene" uid="uid://o2egm85y3wul" path="res://Experiments/Recuration/Assets/TheMoon/TheMoon.tscn" id="3_yu4li"]
|
[ext_resource type="PackedScene" uid="uid://o2egm85y3wul" path="res://Experiments/Recuration/Assets/TheMoon/TheMoon.tscn" id="3_yu4li"]
|
||||||
|
|
||||||
[node name="Recuration" type="Node2D" unique_id=1741828961]
|
[node name="Recuration" type="Node2D" unique_id=1741828961]
|
||||||
@@ -13,5 +14,13 @@ metadata/_custom_type_script = "uid://bqslv86lm78ci"
|
|||||||
|
|
||||||
[node name="Ui" parent="RecurionCamera" unique_id=1649292342 instance=ExtResource("2_qgdyp")]
|
[node name="Ui" parent="RecurionCamera" unique_id=1649292342 instance=ExtResource("2_qgdyp")]
|
||||||
|
|
||||||
[node name="TheMoon" parent="." unique_id=1994078602 instance=ExtResource("3_yu4li")]
|
[node name="CreatePlanet" type="Node" parent="RecurionCamera" unique_id=6331954]
|
||||||
|
script = ExtResource("3_s7jin")
|
||||||
|
planet = ExtResource("3_yu4li")
|
||||||
|
metadata/_custom_type_script = "uid://dhphpobeahiil"
|
||||||
|
|
||||||
|
[node name="TheMoon" parent="." unique_id=1994078602 groups=["Planets"] instance=ExtResource("3_yu4li")]
|
||||||
position = Vector2(-181, -79)
|
position = Vector2(-181, -79)
|
||||||
|
|
||||||
|
[node name="TheMoon2" parent="." unique_id=826424265 groups=["Planets"] instance=ExtResource("3_yu4li")]
|
||||||
|
position = Vector2(115, -108)
|
||||||
|
|||||||
15
Experiments/Recuration/Scripts/CreatePlanet.gd
Normal file
15
Experiments/Recuration/Scripts/CreatePlanet.gd
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
class_name CreatePlanet
|
||||||
|
|
||||||
|
@export var planet: PackedScene
|
||||||
|
@onready var camera: Camera2D = get_parent()
|
||||||
|
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
if (event is InputEventMouseButton):
|
||||||
|
if (event.button_mask == MOUSE_BUTTON_LEFT):
|
||||||
|
var planet_instance: Node2D = planet.instantiate()
|
||||||
|
var viewport_size = get_viewport().get_visible_rect().size / 2
|
||||||
|
planet_instance.position = event.position - viewport_size + camera.position
|
||||||
|
get_tree().root.add_child(planet_instance)
|
||||||
1
Experiments/Recuration/Scripts/CreatePlanet.gd.uid
Normal file
1
Experiments/Recuration/Scripts/CreatePlanet.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dhphpobeahiil
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://cbqapc1frbhtv"]
|
[gd_scene format=3 uid="uid://cbqapc1frbhtv"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Experiments/Recuration/UI/ui.gd" id="1_0oc4u"]
|
[ext_resource type="Script" uid="uid://dslwh6krdrhb" path="res://Experiments/Recuration/UI/ui.gd" id="1_0oc4u"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://byb5pcvu3lixf" path="res://Experiments/Recuration/UI/planet_ui.tscn" id="2_7k02w"]
|
||||||
|
|
||||||
[node name="Ui" type="Control" unique_id=1649292342]
|
[node name="Ui" type="Control" unique_id=1649292342]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -10,3 +11,6 @@ anchor_bottom = 1.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
script = ExtResource("1_0oc4u")
|
script = ExtResource("1_0oc4u")
|
||||||
|
|
||||||
|
[node name="PlanetUi" parent="." unique_id=1388932399 instance=ExtResource("2_7k02w")]
|
||||||
|
layout_mode = 1
|
||||||
|
|||||||
17
Experiments/Recuration/UI/planet_ui.tscn
Normal file
17
Experiments/Recuration/UI/planet_ui.tscn
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[gd_scene format=3 uid="uid://byb5pcvu3lixf"]
|
||||||
|
|
||||||
|
[node name="PlanetUi" type="Control" unique_id=1388932399]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1965327603]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_right = 110.0
|
||||||
|
offset_bottom = 77.0
|
||||||
|
|
||||||
|
[node name="Test" type="Label" parent="VBoxContainer" unique_id=2044219282]
|
||||||
|
layout_mode = 2
|
||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,43 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://81isstkmpvtx"
|
|
||||||
path="res://.godot/imported/Movement 2D.svg-c210344939ea32c22fa1f0a96dee3ff0.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Games/SpaceResources/Planning/Movement 2D.svg"
|
|
||||||
dest_files=["res://.godot/imported/Movement 2D.svg-c210344939ea32c22fa1f0a96dee3ff0.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
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/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
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
|
|
||||||
svg/scale=1.0
|
|
||||||
editor/scale_with_editor_scale=false
|
|
||||||
editor/convert_colors_with_editor_theme=false
|
|
||||||
@@ -22,6 +22,11 @@ config/icon="uid://drtq05t1m0ad7"
|
|||||||
config/macos_native_icon="res://icon.icns"
|
config/macos_native_icon="res://icon.icns"
|
||||||
config/windows_native_icon="res://icon.ico"
|
config/windows_native_icon="res://icon.ico"
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
BackToMain="*uid://c6n4axv3eoguq"
|
||||||
|
PlanetsSingelton="*uid://dhdnbucgojrv6"
|
||||||
|
|
||||||
[filesystem]
|
[filesystem]
|
||||||
|
|
||||||
import/blender/enabled.android=true
|
import/blender/enabled.android=true
|
||||||
|
|||||||
Reference in New Issue
Block a user