Rotate the bottles

This commit is contained in:
Marvin Dalheimer 2024-01-27 17:32:41 +01:00
parent 7460acf72d
commit 21b96bc687
Signed by: Rinma
GPG Key ID: 44CAD3A9F1679D8D
3 changed files with 24 additions and 13 deletions

View File

@ -11,9 +11,10 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
var t = create_tween()
var t = create_tween().set_parallel()
t.tween_property(self, "global_position", tim_global_position, 3.0)
t.tween_callback(remove_bottle)
t.tween_property(self, "rotation_degrees", rotation_degrees + 270, 3.0)
t.tween_callback(remove_bottle).set_delay(3.05)
func _on_bottle_area_entered(area):
is_hidding = true

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://c5f5v1wtottyp"]
[ext_resource type="Script" path="res://scenes/objects/bottle.gd" id="1_87ktq"]
[ext_resource type="Texture2D" uid="uid://bavsg3hu7pccy" path="res://sprites/room/bottle.svg" id="1_uea7l"]
[ext_resource type="Texture2D" uid="uid://cow4dd0hlxrgr" path="res://sprites/room/bottle.svg" id="1_uea7l"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_p8qcj"]
radius = 22.4893

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://cicyfp5xjvvu4"]
[gd_scene load_steps=8 format=3 uid="uid://cicyfp5xjvvu4"]
[ext_resource type="Script" path="res://scenes/Tim.gd" id="1_g3k2b"]
[ext_resource type="Texture2D" uid="uid://kq63ictuirhc" path="res://sprites/tim_side.png" id="1_saxit"]
@ -8,6 +8,9 @@
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_3hx6l"]
size = Vector2(600, 200)
[sub_resource type="CircleShape2D" id="CircleShape2D_jfw8v"]
radius = 23.0217
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wmfel"]
size = Vector2(250, 10000)
@ -26,6 +29,13 @@ boundary = NodePath("../Boundary")
tim_sprite = NodePath("Sprite2D")
transmitter_area = NodePath("Joke Transmitter/Area2D")
[node name="ThrowPoint" type="Area2D" parent="Tim"]
position = Vector2(0, -153)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tim/ThrowPoint"]
position = Vector2(0, 1)
shape = SubResource("CircleShape2D_jfw8v")
[node name="Sprite2D" type="Sprite2D" parent="Tim"]
z_index = 110
position = Vector2(-12, -142)