Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions src/instancing_starter/Ball.tscn
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=4 format=3 uid="uid://dm5jrnxmxnuof"]

[ext_resource path="res://assets/ballBlue_10.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://dv6rx85s1gy3i" path="res://assets/ballBlue_10.png" id="1"]

[sub_resource type="PhysicsMaterial" id=1]
[sub_resource type="PhysicsMaterial" id="1"]

[sub_resource type="CircleShape2D" id=2]
[sub_resource type="CircleShape2D" id="2"]
radius = 37.1452

[node name="Ball" type="RigidBody2D"]
physics_material_override = SubResource( 1 )
physics_material_override = SubResource("1")
gravity_scale = 4.0
__meta__ = {
"_edit_group_": true
}

[node name="Sprite" type="Sprite" parent="."]
scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 1 )
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
texture = ExtResource("1")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
shape = SubResource("2")
6 changes: 3 additions & 3 deletions src/instancing_starter/Main.gd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
extends Node

export (PackedScene) var Ball
@export var Ball: PackedScene

func _input(event):
if event.is_action_pressed("click"):
var new_ball = Ball.instance()
var new_ball = Ball.instantiate()
new_ball.position = get_viewport().get_mouse_position()
add_child(new_ball)
add_child(new_ball)
144 changes: 56 additions & 88 deletions src/instancing_starter/Main.tscn
Original file line number Diff line number Diff line change
@@ -1,165 +1,133 @@
[gd_scene load_steps=13 format=2]
[gd_scene load_steps=13 format=3 uid="uid://bc04jgq832nvc"]

[ext_resource path="res://Main.gd" type="Script" id=1]
[ext_resource path="res://Ball.tscn" type="PackedScene" id=2]
[ext_resource path="res://assets/Bouncy Platform Long.png" type="Texture" id=3]
[ext_resource type="Script" path="res://Main.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://dm5jrnxmxnuof" path="res://Ball.tscn" id="2"]
[ext_resource type="Texture2D" uid="uid://dkq1swbmmxmbq" path="res://assets/Bouncy Platform Long.png" id="3"]

[sub_resource type="PhysicsMaterial" id=1]
[sub_resource type="PhysicsMaterial" id="1"]
bounce = 0.5

[sub_resource type="CapsuleShape2D" id=2]
[sub_resource type="CapsuleShape2D" id="2"]
radius = 28.7617
height = 253.621
height = 309.37

[sub_resource type="PhysicsMaterial" id=3]
[sub_resource type="PhysicsMaterial" id="3"]
bounce = 0.5

[sub_resource type="PhysicsMaterial" id=4]
[sub_resource type="PhysicsMaterial" id="4"]
bounce = 0.5

[sub_resource type="PhysicsMaterial" id=5]
[sub_resource type="PhysicsMaterial" id="5"]
bounce = 0.5

[sub_resource type="PhysicsMaterial" id=6]
[sub_resource type="PhysicsMaterial" id="6"]
bounce = 0.5

[sub_resource type="PhysicsMaterial" id=7]
[sub_resource type="PhysicsMaterial" id="7"]
bounce = 0.5

[sub_resource type="PhysicsMaterial" id=8]
[sub_resource type="PhysicsMaterial" id="8"]
bounce = 0.5

[sub_resource type="PhysicsMaterial" id=9]
[sub_resource type="PhysicsMaterial" id="9"]
bounce = 0.5

[node name="Main" type="Node"]
script = ExtResource( 1 )
Ball = ExtResource( 2 )
script = ExtResource("1")
Ball = ExtResource("2")

[node name="WallContainer" type="Node" parent="."]

[node name="Wall2" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 880.952, 495.157 )
position = Vector2(880.952, 495.157)
rotation = -0.264907
physics_material_override = SubResource( 1 )
__meta__ = {
"_edit_group_": true
}
physics_material_override = SubResource("1")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall2"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall2"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall2"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall7" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 462.444, 216.865 )
position = Vector2(462.444, 216.865)
rotation = -1.02983
physics_material_override = SubResource( 3 )
__meta__ = {
"_edit_group_": true
}
physics_material_override = SubResource("3")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall7"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall7"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall7"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall8" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 585.534, 221.147 )
position = Vector2(585.534, 221.147)
rotation = 1.07416
physics_material_override = SubResource( 4 )
__meta__ = {
"_edit_group_": true
}
physics_material_override = SubResource("4")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall8"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall8"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall8"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall4" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 996.874, 342.897 )
position = Vector2(996.874, 342.897)
rotation = -1.5708
physics_material_override = SubResource( 5 )
__meta__ = {
"_edit_group_": true
}
physics_material_override = SubResource("5")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall4"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall4"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall4"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall1" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 148.047, 491.522 )
position = Vector2(148.047, 491.522)
rotation = 0.315662
physics_material_override = SubResource( 6 )
__meta__ = {
"_edit_group_": true
}
physics_material_override = SubResource("6")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall1"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall1"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall1"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall5" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 30.2087, 337.685 )
position = Vector2(30.2087, 337.685)
rotation = 1.5708
physics_material_override = SubResource( 7 )
__meta__ = {
"_edit_group_": true
}
physics_material_override = SubResource("7")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall5"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall5"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall5"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall3" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 397.133, 570.384 )
physics_material_override = SubResource( 8 )
__meta__ = {
"_edit_group_": true
}
position = Vector2(397.133, 570.384)
physics_material_override = SubResource("8")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall3"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall3"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall3"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")

[node name="Wall6" type="StaticBody2D" parent="WallContainer"]
editor/display_folded = true
position = Vector2( 699.667, 571.226 )
physics_material_override = SubResource( 9 )
__meta__ = {
"_edit_group_": true
}
position = Vector2(699.667, 571.226)
physics_material_override = SubResource("9")

[node name="Sprite" type="Sprite" parent="WallContainer/Wall6"]
texture = ExtResource( 3 )
[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall6"]
texture = ExtResource("3")

[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall6"]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource("2")
32 changes: 16 additions & 16 deletions src/instancing_starter/assets/Bouncy Platform Long.png.import
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Bouncy Platform Long.png-9b2628c180785c5ec622adb5c4ee7b17.stex"
type="CompressedTexture2D"
uid="uid://dkq1swbmmxmbq"
path="res://.godot/imported/Bouncy Platform Long.png-9b2628c180785c5ec622adb5c4ee7b17.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/Bouncy Platform Long.png"
dest_files=[ "res://.import/Bouncy Platform Long.png-9b2628c180785c5ec622adb5c4ee7b17.stex" ]
dest_files=["res://.godot/imported/Bouncy Platform Long.png-9b2628c180785c5ec622adb5c4ee7b17.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/hdr_compression=1
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
32 changes: 16 additions & 16 deletions src/instancing_starter/assets/Bouncy Platform Medium.png.import
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Bouncy Platform Medium.png-7896338a5f44da1e83084c154a3c4a9e.stex"
type="CompressedTexture2D"
uid="uid://blqm0e7gm75u3"
path="res://.godot/imported/Bouncy Platform Medium.png-7896338a5f44da1e83084c154a3c4a9e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/Bouncy Platform Medium.png"
dest_files=[ "res://.import/Bouncy Platform Medium.png-7896338a5f44da1e83084c154a3c4a9e.stex" ]
dest_files=["res://.godot/imported/Bouncy Platform Medium.png-7896338a5f44da1e83084c154a3c4a9e.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/hdr_compression=1
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading