added Graphics and sound Effects and more overhauls

This commit is contained in:
Exobyt 2025-08-03 20:56:32 +02:00
parent c887a2168c
commit b9d4288900
214 changed files with 3378 additions and 198 deletions

View file

@ -0,0 +1,4 @@
extends AnimationPlayer
func _ready() -> void:
play("spin")

View file

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

View file

@ -1,18 +1,36 @@
class_name Meteor extends "res://scenes/obstacle/obstacle.gd"
@onready var animationPlayer = $AnimationPlayer
@export var minSpeed: int = 100
@export var maxSpeed: int = 1000
@export var minScale: float = 0.5
@export var maxScale: float = 2
var rotated = false
var speed: int = 1000
var offset: int = 0
var direction: int
func _init() -> void:
var rng = RandomNumberGenerator.new()
direction = rng.randi_range(0, 360)
var newScale = rng.randf_range(minScale, maxScale)
scale = Vector2(newScale, newScale)
var direction = Vector2.UP.rotated(rotation)
direction = rng.randi_range(0, 20)
speed = rng.randi_range(minSpeed, maxSpeed)
rotation = direction
#rotation = direction
func _physics_process(delta: float) -> void:
velocity = Vector2.UP.rotated(direction).normalized() * speed
if not rotated:
rotated = true
if Globals.getPlayer() != null:
look_at(Globals.getPlayer().global_position)
var rng = RandomNumberGenerator.new()
velocity = Vector2.RIGHT.rotated(rotation+offset).normalized() * speed
move_and_slide()

View file

@ -1,36 +1,83 @@
[gd_scene load_steps=7 format=3 uid="uid://vl8duuwwrpqm"]
[gd_scene load_steps=11 format=3 uid="uid://vl8duuwwrpqm"]
[ext_resource type="PackedScene" uid="uid://cgqo1nxq6xprm" path="res://scenes/obstacle/obstacle.tscn" id="1_skd46"]
[ext_resource type="PackedScene" uid="uid://cgqo1nxq6xprm" path="res://scenes/obstacle/obstacle.tscn" id="1_8c34n"]
[ext_resource type="Script" uid="uid://b82cnxsh4mn0f" path="res://scenes/obstacle/meteor/meteor.gd" id="2_8c34n"]
[ext_resource type="Texture2D" uid="uid://cfwyw1sr6x2np" path="res://icon.svg" id="3_jb48p"]
[sub_resource type="CircleShape2D" id="CircleShape2D_8c34n"]
radius = 56.0
[ext_resource type="Texture2D" uid="uid://drk4xkhlq00x3" path="res://assets/obstacles/meteor.png" id="3_jb48p"]
[ext_resource type="Script" uid="uid://mnl62nrp3ffi" path="res://scenes/obstacle/meteor/animation_player.gd" id="4_pganv"]
[sub_resource type="CircleShape2D" id="CircleShape2D_jb48p"]
radius = 64.0
radius = 128.0
[sub_resource type="CircleShape2D" id="CircleShape2D_pganv"]
radius = 64.0
radius = 144.0
[node name="Meteor" instance=ExtResource("1_skd46")]
modulate = Color(1, 0, 0, 1)
[sub_resource type="CircleShape2D" id="CircleShape2D_22u22"]
radius = 128.25
[sub_resource type="Animation" id="Animation_22u22"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_pganv"]
resource_name = "spin"
length = 5.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 6.28319]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_b3sfu"]
_data = {
&"RESET": SubResource("Animation_22u22"),
&"spin": SubResource("Animation_pganv")
}
[node name="Meteor" instance=ExtResource("1_8c34n")]
script = ExtResource("2_8c34n")
minSpeed = 100
maxSpeed = 1000
health = 10
minScale = 0.5
maxScale = 2.0
[node name="CollisionShape2D" parent="." index="0"]
shape = SubResource("CircleShape2D_8c34n")
[node name="CollisionShape2D" parent="DamageArea" index="0"]
shape = SubResource("CircleShape2D_jb48p")
[node name="CollisionShape2D" parent="hurtArea" index="0"]
[node name="CollisionShape2D" parent="DamageArea" index="0"]
shape = SubResource("CircleShape2D_pganv")
[node name="CollisionShape2D" parent="hurtArea" index="0"]
shape = SubResource("CircleShape2D_22u22")
[node name="Sprite2D" parent="." index="3"]
position = Vector2(5.72205e-06, 5.72205e-06)
scale = Vector2(0.666667, 0.666667)
texture = ExtResource("3_jb48p")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="6"]
libraries = {
&"": SubResource("AnimationLibrary_b3sfu")
}
script = ExtResource("4_pganv")
[editable path="DamageArea"]
[editable path="hurtArea"]