main.tscn 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. [gd_scene load_steps=17 format=3 uid="uid://dwufsrfb2nb2n"]
  2. [ext_resource type="Texture2D" uid="uid://crdr1r3gdxcaa" path="res://assets/background.png" id="1_0w7c8"]
  3. [ext_resource type="Theme" uid="uid://htiph5vt1b65" path="res://assets/theme.tres" id="1_fpe2o"]
  4. [ext_resource type="Script" path="res://scripts/main.gd" id="1_im3s4"]
  5. [ext_resource type="Script" path="res://scripts/background.gd" id="2_dvs30"]
  6. [ext_resource type="Script" path="res://scripts/player.gd" id="3_c3as0"]
  7. [ext_resource type="Texture2D" uid="uid://bxm45jk7k7v0t" path="res://assets/cheep_cheep.png" id="4_5wnm6"]
  8. [ext_resource type="Script" path="res://scripts/foreground.gd" id="5_2ydct"]
  9. [ext_resource type="Texture2D" uid="uid://bq8l7whcyrxki" path="res://assets/foreground.png" id="6_s40v3"]
  10. [ext_resource type="PackedScene" uid="uid://cjhnwyawaq2gb" path="res://scenes/pipe.tscn" id="7_tlj6u"]
  11. [ext_resource type="Script" path="res://scripts/instruction.gd" id="10_t1pcn"]
  12. [sub_resource type="RectangleShape2D" id="RectangleShape2D_malyy"]
  13. size = Vector2(56, 56)
  14. [sub_resource type="Animation" id="Animation_vbqcw"]
  15. length = 0.001
  16. tracks/0/type = "value"
  17. tracks/0/imported = false
  18. tracks/0/enabled = true
  19. tracks/0/path = NodePath("CheepCheep:frame")
  20. tracks/0/interp = 1
  21. tracks/0/loop_wrap = true
  22. tracks/0/keys = {
  23. "times": PackedFloat32Array(0),
  24. "transitions": PackedFloat32Array(1),
  25. "update": 1,
  26. "values": [0]
  27. }
  28. [sub_resource type="Animation" id="Animation_6aqaj"]
  29. resource_name = "flappying"
  30. length = 0.2
  31. tracks/0/type = "value"
  32. tracks/0/imported = false
  33. tracks/0/enabled = true
  34. tracks/0/path = NodePath("CheepCheep:frame")
  35. tracks/0/interp = 1
  36. tracks/0/loop_wrap = true
  37. tracks/0/keys = {
  38. "times": PackedFloat32Array(0, 0.1),
  39. "transitions": PackedFloat32Array(1, 1),
  40. "update": 1,
  41. "values": [0, 1]
  42. }
  43. [sub_resource type="AnimationLibrary" id="AnimationLibrary_kappv"]
  44. _data = {
  45. "RESET": SubResource("Animation_vbqcw"),
  46. "flappying": SubResource("Animation_6aqaj")
  47. }
  48. [sub_resource type="RectangleShape2D" id="RectangleShape2D_33xgh"]
  49. size = Vector2(60, 60)
  50. [sub_resource type="RectangleShape2D" id="RectangleShape2D_vjc1t"]
  51. size = Vector2(56, 112)
  52. [node name="main" type="Control"]
  53. layout_mode = 3
  54. anchors_preset = 15
  55. anchor_right = 1.0
  56. anchor_bottom = 1.0
  57. grow_horizontal = 2
  58. grow_vertical = 2
  59. theme = ExtResource("1_fpe2o")
  60. script = ExtResource("1_im3s4")
  61. [node name="background_0" type="Sprite2D" parent="."]
  62. texture_repeat = 2
  63. texture = ExtResource("1_0w7c8")
  64. centered = false
  65. region_enabled = true
  66. region_rect = Rect2(0, 0, 3328, 720)
  67. script = ExtResource("2_dvs30")
  68. [node name="pipe" parent="." instance=ExtResource("7_tlj6u")]
  69. position = Vector2(1344, 440)
  70. [node name="pipe2" parent="." instance=ExtResource("7_tlj6u")]
  71. position = Vector2(1984, 360)
  72. [node name="player" type="Area2D" parent="."]
  73. position = Vector2(420, 686)
  74. script = ExtResource("3_c3as0")
  75. metadata/_edit_group_ = true
  76. [node name="CollisionShape2D" type="CollisionShape2D" parent="player"]
  77. shape = SubResource("RectangleShape2D_malyy")
  78. [node name="CheepCheep" type="Sprite2D" parent="player"]
  79. texture_filter = 1
  80. texture = ExtResource("4_5wnm6")
  81. hframes = 2
  82. [node name="Timer" type="Timer" parent="player"]
  83. [node name="AnimationPlayer" type="AnimationPlayer" parent="player"]
  84. libraries = {
  85. "": SubResource("AnimationLibrary_kappv")
  86. }
  87. [node name="foreground" type="Sprite2D" parent="."]
  88. texture_repeat = 2
  89. position = Vector2(0, 608)
  90. texture = ExtResource("6_s40v3")
  91. centered = false
  92. region_enabled = true
  93. region_rect = Rect2(0, 0, 1408, 112)
  94. script = ExtResource("5_2ydct")
  95. [node name="output" type="Label" parent="."]
  96. layout_mode = 1
  97. anchors_preset = 5
  98. anchor_left = 0.5
  99. anchor_right = 0.5
  100. offset_left = -640.0
  101. offset_right = 640.0
  102. offset_bottom = 96.0
  103. grow_horizontal = 2
  104. text = "0"
  105. horizontal_alignment = 1
  106. vertical_alignment = 2
  107. [node name="death_label" type="Label" parent="."]
  108. visible = false
  109. layout_mode = 1
  110. anchors_preset = 8
  111. anchor_left = 0.5
  112. anchor_top = 0.5
  113. anchor_right = 0.5
  114. anchor_bottom = 0.5
  115. offset_left = -404.5
  116. offset_top = -36.0
  117. offset_right = 404.5
  118. offset_bottom = 36.0
  119. grow_horizontal = 2
  120. grow_vertical = 2
  121. theme_override_font_sizes/font_size = 46
  122. text = "press space to retry..."
  123. [node name="Timer" type="Timer" parent="."]
  124. [node name="top_boundry" type="Area2D" parent="."]
  125. position = Vector2(420, -32)
  126. metadata/_edit_group_ = true
  127. [node name="CollisionShape2D" type="CollisionShape2D" parent="top_boundry"]
  128. position = Vector2(-2, 2)
  129. shape = SubResource("RectangleShape2D_33xgh")
  130. [node name="bottom_boundry" type="Area2D" parent="."]
  131. [node name="CollisionShape2D" type="CollisionShape2D" parent="bottom_boundry"]
  132. position = Vector2(420, 664)
  133. shape = SubResource("RectangleShape2D_vjc1t")
  134. disabled = true
  135. [node name="instruction" type="Label" parent="."]
  136. layout_mode = 1
  137. anchors_preset = 8
  138. anchor_left = 0.5
  139. anchor_top = 0.5
  140. anchor_right = 0.5
  141. anchor_bottom = 0.5
  142. offset_left = -86.0
  143. offset_top = -191.0
  144. offset_right = 87.0
  145. offset_bottom = -168.0
  146. grow_horizontal = 2
  147. grow_vertical = 2
  148. theme_override_font_sizes/font_size = 16
  149. text = "press space ..."
  150. script = ExtResource("10_t1pcn")