first Prototype

This commit is contained in:
Exobyt 2025-08-02 12:27:49 +02:00
parent 89503407e7
commit c887a2168c
78 changed files with 2494 additions and 2 deletions

View file

@ -0,0 +1,18 @@
class_name Meteor extends "res://scenes/obstacle/obstacle.gd"
@export var minSpeed: int = 100
@export var maxSpeed: int = 1000
var speed: int = 1000
var direction: int
func _init() -> void:
var rng = RandomNumberGenerator.new()
direction = rng.randi_range(0, 360)
speed = rng.randi_range(minSpeed, maxSpeed)
rotation = direction
func _physics_process(delta: float) -> void:
velocity = Vector2.UP.rotated(direction).normalized() * speed
move_and_slide()

View file

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

View file

@ -0,0 +1,36 @@
[gd_scene load_steps=7 format=3 uid="uid://vl8duuwwrpqm"]
[ext_resource type="PackedScene" uid="uid://cgqo1nxq6xprm" path="res://scenes/obstacle/obstacle.tscn" id="1_skd46"]
[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
[sub_resource type="CircleShape2D" id="CircleShape2D_jb48p"]
radius = 64.0
[sub_resource type="CircleShape2D" id="CircleShape2D_pganv"]
radius = 64.0
[node name="Meteor" instance=ExtResource("1_skd46")]
modulate = Color(1, 0, 0, 1)
script = ExtResource("2_8c34n")
minSpeed = 100
maxSpeed = 1000
health = 10
[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"]
shape = SubResource("CircleShape2D_pganv")
[node name="Sprite2D" parent="." index="3"]
texture = ExtResource("3_jb48p")
[editable path="DamageArea"]
[editable path="hurtArea"]