Added a circle
This commit is contained in:
parent
5613e54896
commit
8b07000d46
4 changed files with 35 additions and 0 deletions
5
draw_circle.gd
Normal file
5
draw_circle.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
extends Sprite2D
|
||||||
|
@export var radius : float;
|
||||||
|
|
||||||
|
func _draw():
|
||||||
|
draw_circle(Vector2.ZERO, radius, Color.BLACK, true, -1.0, true)
|
||||||
1
draw_circle.gd.uid
Normal file
1
draw_circle.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b5fhsy1xlreco
|
||||||
22
earth.tscn
Normal file
22
earth.tscn
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://33k5v6skcbsm"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="1_qbwya"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5fhsy1xlreco" path="res://draw_circle.gd" id="2_2bhor"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_5i67w"]
|
||||||
|
radius = 3000.0
|
||||||
|
|
||||||
|
[node name="Earth" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="Ground" type="StaticBody2D" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
|
||||||
|
shape = SubResource("CircleShape2D_5i67w")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="Ground"]
|
||||||
|
texture = ExtResource("1_qbwya")
|
||||||
|
script = ExtResource("2_2bhor")
|
||||||
|
radius = 3000.0
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
position = Vector2(47, -3283)
|
||||||
|
|
@ -11,5 +11,12 @@ config_version=5
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="The Dark Side of Earth"
|
config/name="The Dark Side of Earth"
|
||||||
|
run/main_scene="res://earth.tscn"
|
||||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=1920
|
||||||
|
window/size/viewport_height=1080
|
||||||
|
window/size/mode=3
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue