camera now has scroll direction toggles

This commit is contained in:
pennyrigate 2022-12-26 22:57:47 -05:00
parent 48cc1d43d6
commit c60375cb98
11 changed files with 202 additions and 70 deletions

View file

@ -1,16 +1,17 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://objects/turniwood/turniwood.gd" type="Script" id=1]
[ext_resource path="res://graphics/turniwood/turniwood.png" type="Texture" id=2]
[ext_resource path="res://graphics/turniwood/turniwood_yellow.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 4, 1 )
[sub_resource type="Animation" id=2]
resource_name = "idle"
loop = true
step = 0.125
tracks/0/type = "value"
tracks/0/path = NodePath("StaticBody2D/CollisionShape2D:disabled")
tracks/0/path = NodePath("Sprite:region_rect")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
@ -19,22 +20,22 @@ tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:region_rect")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ Rect2( 0, 0, 8, 8 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Sprite:rotation_degrees")
tracks/2/path = NodePath("StaticBody2D/CollisionShape2D:disabled")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
@ -43,12 +44,12 @@ tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0.0 ]
"values": [ false ]
}
[sub_resource type="Animation" id=3]
resource_name = "turn"
length = 0.625
length = 0.375
step = 0.125
tracks/0/type = "value"
tracks/0/path = NodePath("StaticBody2D/CollisionShape2D:disabled")
@ -57,10 +58,10 @@ tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.125, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false, true, false ]
"values": [ true ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:region_rect")
@ -69,10 +70,10 @@ tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.125, 0.25, 0.375, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"times": PoolRealArray( 0, 0.125, 0.25 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ Rect2( 0, 0, 8, 8 ), Rect2( 8, 0, 8, 8 ), Rect2( 0, 0, 8, 8 ), Rect2( 8, 0, 8, 8 ), Rect2( 0, 0, 8, 8 ) ]
"values": [ Rect2( 8, 0, 8, 8 ), Rect2( 0, 0, 8, 8 ), Rect2( 8, 0, 8, 8 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Sprite:rotation_degrees")
@ -81,10 +82,10 @@ tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.125, 0.25, 0.375, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"times": PoolRealArray( 0, 0.125, 0.25 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 0.0, 90.0, 90.0, 0.0, 0.0 ]
"values": [ 90.0, 90.0, 0.0 ]
}
[node name="Turniwood" type="Node2D"]
@ -106,4 +107,7 @@ shape = SubResource( 1 )
anims/idle = SubResource( 2 )
anims/turn = SubResource( 3 )
[node name="Timer" type="Timer" parent="."]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]