You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

102 regels
2.9 KiB

  1. [gd_scene load_steps=10 format=2]
  2. [ext_resource path="res://jrpg/scripts/entities/switch.gd" type="Script" id=1]
  3. [ext_resource path="res://jrpg/scripts/entities/utils/trigger_relay.gd" type="Script" id=2]
  4. [sub_resource type="BoxShape" id=1]
  5. extents = Vector3( 0.25, 0.25, 0.25 )
  6. [sub_resource type="CubeMesh" id=2]
  7. size = Vector3( 0.5, 0.2, 0.5 )
  8. [sub_resource type="CubeMesh" id=3]
  9. size = Vector3( 0.2, 0.159, 0.287 )
  10. [sub_resource type="SpatialMaterial" id=4]
  11. albedo_color = Color( 1, 0, 0, 1 )
  12. [sub_resource type="Animation" id=5]
  13. tracks/0/type = "value"
  14. tracks/0/path = NodePath("Model/MeshInstance2:material/0:albedo_color")
  15. tracks/0/interp = 1
  16. tracks/0/loop_wrap = true
  17. tracks/0/imported = false
  18. tracks/0/enabled = true
  19. tracks/0/keys = {
  20. "times": PoolRealArray( 1 ),
  21. "transitions": PoolRealArray( 1 ),
  22. "update": 0,
  23. "values": [ Color( 1, 0, 0, 1 ) ]
  24. }
  25. tracks/1/type = "value"
  26. tracks/1/path = NodePath("Model/MeshInstance2:rotation_degrees")
  27. tracks/1/interp = 1
  28. tracks/1/loop_wrap = true
  29. tracks/1/imported = false
  30. tracks/1/enabled = true
  31. tracks/1/keys = {
  32. "times": PoolRealArray( 1 ),
  33. "transitions": PoolRealArray( 1 ),
  34. "update": 0,
  35. "values": [ Vector3( -22, 0, 0 ) ]
  36. }
  37. [sub_resource type="Animation" id=6]
  38. tracks/0/type = "value"
  39. tracks/0/path = NodePath("Model/MeshInstance2:material/0:albedo_color")
  40. tracks/0/interp = 1
  41. tracks/0/loop_wrap = true
  42. tracks/0/imported = false
  43. tracks/0/enabled = true
  44. tracks/0/keys = {
  45. "times": PoolRealArray( 1 ),
  46. "transitions": PoolRealArray( 1 ),
  47. "update": 0,
  48. "values": [ Color( 0, 1, 0.505882, 1 ) ]
  49. }
  50. tracks/1/type = "value"
  51. tracks/1/path = NodePath("Model/MeshInstance2:rotation_degrees")
  52. tracks/1/interp = 1
  53. tracks/1/loop_wrap = true
  54. tracks/1/imported = false
  55. tracks/1/enabled = true
  56. tracks/1/keys = {
  57. "times": PoolRealArray( 1 ),
  58. "transitions": PoolRealArray( 1 ),
  59. "update": 0,
  60. "values": [ Vector3( 22, 0, 0 ) ]
  61. }
  62. [sub_resource type="SphereShape" id=7]
  63. radius = 0.5
  64. [node name="Switch" type="KinematicBody"]
  65. script = ExtResource( 1 )
  66. [node name="CollisionShape" type="CollisionShape" parent="."]
  67. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.15, 0 )
  68. shape = SubResource( 1 )
  69. [node name="Model" type="Spatial" parent="."]
  70. [node name="MeshInstance" type="MeshInstance" parent="Model"]
  71. mesh = SubResource( 2 )
  72. material/0 = null
  73. [node name="MeshInstance2" type="MeshInstance" parent="Model"]
  74. transform = Transform( 1, 0, 0, 0, 0.927184, 0.374607, 0, -0.374607, 0.927184, 0, 0.0918144, 0 )
  75. mesh = SubResource( 3 )
  76. material/0 = SubResource( 4 )
  77. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  78. anims/Off = SubResource( 5 )
  79. anims/On = SubResource( 6 )
  80. [node name="InteractableArea" type="Area" parent="."]
  81. script = ExtResource( 2 )
  82. [node name="CollisionShape" type="CollisionShape" parent="InteractableArea"]
  83. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.35, 0 )
  84. shape = SubResource( 7 )
  85. [connection signal="on_interact" from="InteractableArea" to="." method="on_interact"]