38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
[gd_scene load_steps=4 format=3 uid="uid://drpe7vgdqqyh4"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://6hx4g1df1di4" path="res://GPE/CannonBall/cannonBall.png" id="2_so0x5"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_3iblm"]
|
|
script/source = "extends RigidBody2D
|
|
|
|
@export var speed: float = 150.0
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
func _physics_process(delta: float):
|
|
apply_central_force(Vector2(speed, 0).rotated(rotation))
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|
|
"
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_orehy"]
|
|
radius = 5.0
|
|
|
|
[node name="RigidBody2D" type="RigidBody2D"]
|
|
gravity_scale = 0.0
|
|
script = SubResource("GDScript_3iblm")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("CircleShape2D_orehy")
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
texture = ExtResource("2_so0x5")
|
|
|
|
[node name="Sprite2D2" type="Sprite2D" parent="Sprite2D"]
|
|
position = Vector2(9, 0)
|
|
texture = ExtResource("2_so0x5")
|