godot_rl_BallChase / BallChase.tscn
edbeeching's picture
edbeeching HF staff
Upload . with huggingface_hub
7019bd1
raw
history blame
5.48 kB
[gd_scene load_steps=13 format=3 uid="uid://bj8j0v5unredq"]
[ext_resource type="Script" path="res://Player.gd" id="1"]
[ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" id="2"]
[ext_resource type="Texture2D" uid="uid://c77mj86i50gub" path="res://cherry.png" id="3_25acu"]
[ext_resource type="Texture2D" uid="uid://cy4acafft8vjv" path="res://lollipopGreen.png" id="3_ty2qt"]
[sub_resource type="CircleShape2D" id="1"]
radius = 30.0
[sub_resource type="CircleShape2D" id="3"]
radius = 30.0
[sub_resource type="RectangleShape2D" id="4"]
size = Vector2(20, 720)
[sub_resource type="RectangleShape2D" id="5"]
size = Vector2(20, 720)
[sub_resource type="RectangleShape2D" id="6"]
size = Vector2(1240, 20)
[sub_resource type="RectangleShape2D" id="7"]
size = Vector2(1240, 20)
[sub_resource type="RectangleShape2D" id="8"]
size = Vector2(58.338, 286.306)
[sub_resource type="Environment" id="9"]
background_mode = 4
tonemap_mode = 3
glow_levels/1 = 1.0
glow_levels/2 = 1.0
glow_levels/3 = 0.0
glow_levels/4 = 1.0
glow_levels/5 = 0.0
glow_intensity = 0.1
glow_strength = 1.17
glow_bloom = 0.09
glow_blend_mode = 0
[node name="BallChase" type="Node2D"]
[node name="Player" type="CharacterBody2D" parent="." groups=["AGENT"]]
position = Vector2(281.728, 162.943)
script = ExtResource("1")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
shape = SubResource("1")
[node name="RaycastSensor2D" type="Node2D" parent="Player"]
script = ExtResource("2")
collide_with_areas = true
[node name="Sprite2D" type="Sprite2D" parent="Player"]
scale = Vector2(0.9, 0.9)
texture = ExtResource("3_ty2qt")
[node name="Fruit" type="Area2D" parent="."]
position = Vector2(1095.01, 578.224)
collision_layer = 2
collision_mask = 3
[node name="CollisionShape2D" type="CollisionShape2D" parent="Fruit"]
shape = SubResource("3")
[node name="Sprite2D" type="Sprite2D" parent="Fruit"]
position = Vector2(3.98999, -14.224)
scale = Vector2(1.2, 1.2)
texture = ExtResource("3_25acu")
[node name="Walls" type="Node2D" parent="."]
[node name="LeftWall" type="Area2D" parent="Walls"]
position = Vector2(10, 360)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/LeftWall"]
shape = SubResource("4")
[node name="ColorRect" type="ColorRect" parent="Walls/LeftWall"]
offset_left = -10.0
offset_top = -360.0
offset_right = 10.0
offset_bottom = 360.0
color = Color(0.27451, 0.529412, 0.560784, 1)
[node name="RightWall" type="Area2D" parent="Walls"]
position = Vector2(1270, 360)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/RightWall"]
shape = SubResource("5")
[node name="ColorRect" type="ColorRect" parent="Walls/RightWall"]
offset_left = -10.0
offset_top = -360.0
offset_right = 10.0
offset_bottom = 360.0
color = Color(0.27451, 0.529412, 0.560784, 1)
[node name="TopWall" type="Area2D" parent="Walls"]
position = Vector2(640, 10)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/TopWall"]
shape = SubResource("6")
[node name="ColorRect" type="ColorRect" parent="Walls/TopWall"]
offset_left = -620.0
offset_top = -10.0
offset_right = 620.0
offset_bottom = 10.0
color = Color(0.27451, 0.529412, 0.560784, 1)
[node name="BottomWall" type="Area2D" parent="Walls"]
position = Vector2(640, 710)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/BottomWall"]
shape = SubResource("7")
[node name="ColorRect" type="ColorRect" parent="Walls/BottomWall"]
offset_left = -620.0
offset_top = -10.0
offset_right = 620.0
offset_bottom = 10.0
color = Color(0.27451, 0.529412, 0.560784, 1)
[node name="Obstacle4" type="Area2D" parent="Walls"]
position = Vector2(896, 328)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Obstacle4"]
shape = SubResource("8")
[node name="ColorRect" type="ColorRect" parent="Walls/Obstacle4"]
offset_left = -35.0
offset_top = -143.0
offset_right = 29.0
offset_bottom = 153.0
color = Color(0.27451, 0.529412, 0.560784, 1)
[node name="Obstacle5" type="Area2D" parent="Walls"]
position = Vector2(360, 328)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Obstacle5"]
shape = SubResource("8")
[node name="ColorRect" type="ColorRect" parent="Walls/Obstacle5"]
offset_left = -35.0
offset_top = -143.0
offset_right = 29.0
offset_bottom = 153.0
color = Color(0.27451, 0.529412, 0.560784, 1)
[node name="BackGround" type="CanvasLayer" parent="."]
layer = -2
[node name="ColorRect" type="ColorRect" parent="BackGround"]
anchors_preset = -1
anchor_right = 5.954
anchor_bottom = 5.885
offset_right = 15506.9
offset_bottom = 7480.8
color = Color(0.2, 0.172549, 0.313726, 1)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("9")
[connection signal="body_entered" from="Fruit" to="Player" method="_on_Fruit_body_entered"]
[connection signal="body_entered" from="Walls/LeftWall" to="Player" method="_on_LeftWall_body_entered"]
[connection signal="body_entered" from="Walls/RightWall" to="Player" method="_on_RightWall_body_entered"]
[connection signal="body_entered" from="Walls/TopWall" to="Player" method="_on_TopWall_body_entered"]
[connection signal="body_entered" from="Walls/BottomWall" to="Player" method="_on_BottomWall_body_entered"]
[connection signal="body_entered" from="Walls/Obstacle4" to="Player" method="_on_BottomWall_body_entered"]
[connection signal="body_entered" from="Walls/Obstacle5" to="Player" method="_on_BottomWall_body_entered"]