Added rotating space background for planet.tscn

This commit is contained in:
theskywinds 2025-05-19 14:38:05 +02:00
parent 3c991494a4
commit 25aaddacfb
5 changed files with 70 additions and 6 deletions

View File

@ -1,6 +1,8 @@
[gd_scene load_steps=14 format=3 uid="uid://dh0lvt4eb1x5s"] [gd_scene load_steps=17 format=3 uid="uid://dh0lvt4eb1x5s"]
[ext_resource type="Texture2D" uid="uid://btgsbvc7gidjq" path="res://planetScene/planet.png" id="1_6j83a"] [ext_resource type="Texture2D" uid="uid://btgsbvc7gidjq" path="res://planetScene/planet.png" id="1_6j83a"]
[ext_resource type="Texture2D" uid="uid://cuv6yxysv620e" path="res://planetScene/space-seamless.png" id="1_icdcw"]
[ext_resource type="Script" uid="uid://d4crfwu1s5wm1" path="res://planetScene/textureRotate.gd" id="2_dp0ko"]
[ext_resource type="Script" uid="uid://b8kcef36xwy7k" path="res://planetScene/planet_sprite.gd" id="2_jgijx"] [ext_resource type="Script" uid="uid://b8kcef36xwy7k" path="res://planetScene/planet_sprite.gd" id="2_jgijx"]
[ext_resource type="Texture2D" uid="uid://dimdd34ldpix5" path="res://player/smallPlayer/playerSprites/playerSprite_0001.png" id="3_5cujh"] [ext_resource type="Texture2D" uid="uid://dimdd34ldpix5" path="res://player/smallPlayer/playerSprites/playerSprite_0001.png" id="3_5cujh"]
[ext_resource type="Texture2D" uid="uid://cmga6fl4uer1m" path="res://player/smallPlayer/playerSprites/playerSprite_0002.png" id="4_icdcw"] [ext_resource type="Texture2D" uid="uid://cmga6fl4uer1m" path="res://player/smallPlayer/playerSprites/playerSprite_0002.png" id="4_icdcw"]
@ -51,15 +53,33 @@ animations = [{
"speed": 5.0 "speed": 5.0
}] }]
[node name="planet" type="Node2D"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_dp0ko"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] [node name="planetScene" type="Node2D"]
position = Vector2(573, 300)
sprite_frames = SubResource("SpriteFrames_i6oun") [node name="TextureRect" type="TextureRect" parent="."]
autoplay = "default" offset_left = -835.0
offset_top = -538.0
offset_right = 2088.0
offset_bottom = 2077.0
pivot_offset = Vector2(1411, 1294)
texture = ExtResource("1_icdcw")
stretch_mode = 1
script = ExtResource("2_dp0ko")
[node name="planetSprite" type="Sprite2D" parent="."] [node name="planetSprite" type="Sprite2D" parent="."]
position = Vector2(575, 786) position = Vector2(575, 786)
scale = Vector2(4.53252, 4.53252) scale = Vector2(4.53252, 4.53252)
texture = ExtResource("1_6j83a") texture = ExtResource("1_6j83a")
offset = Vector2(0.2, 0.23)
script = ExtResource("2_jgijx") script = ExtResource("2_jgijx")
[node name="playerModel" type="StaticBody2D" parent="."]
position = Vector2(573, 300)
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="playerModel"]
sprite_frames = SubResource("SpriteFrames_i6oun")
autoplay = "default"
[node name="CollisionShape2D" type="CollisionShape2D" parent="playerModel"]
shape = SubResource("RectangleShape2D_dp0ko")

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cuv6yxysv620e"
path="res://.godot/imported/space-seamless.png-1aba281aefa7dcfb8b44f9825c07d7a8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://planetScene/space-seamless.png"
dest_files=["res://.godot/imported/space-seamless.png-1aba281aefa7dcfb8b44f9825c07d7a8.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

View File

@ -0,0 +1,9 @@
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _physics_process(delta: float):
if Input.is_action_pressed("moveLeft"):
rotation += 0.005
if Input.is_action_pressed("moveRight"):
rotation += -0.005

View File

@ -0,0 +1 @@
uid://d4crfwu1s5wm1