Added nearly all basic features.
Added bounce physics, collision layers, masks, and names, pins (and the extra bouncy GiantPin), walls, cup physics, a sample level, and a score system with an accompanying auto-updating GUI label.
This commit is contained in:
@@ -2,10 +2,14 @@ extends RigidBody2D
|
||||
|
||||
var held = false
|
||||
|
||||
func _ready() -> void:
|
||||
$AnimatedSprite.frame = randi() % $AnimatedSprite.frames.get_frame_count("default")
|
||||
|
||||
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
$Shine.rotation_degrees = -rotation_degrees
|
||||
if held:
|
||||
global_transform.origin = get_global_mouse_position()
|
||||
|
||||
|
@@ -1,27 +1,52 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=19 format=2]
|
||||
|
||||
[ext_resource path="res://Art/Extra02.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Art/ShineAndShadow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Balls/Ball.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Art/Aggie.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Art/Clearie.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Art/Cloud01.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Art/Cloud02.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Art/Cloud03.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Art/Corkscrew01.png" type="Texture" id=8]
|
||||
[ext_resource path="res://Art/Corkscrew02.png" type="Texture" id=9]
|
||||
[ext_resource path="res://Art/Corkscrew03.png" type="Texture" id=10]
|
||||
[ext_resource path="res://Art/CatsEye01.png" type="Texture" id=11]
|
||||
[ext_resource path="res://Art/Alley.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Art/CatsEye02.png" type="Texture" id=13]
|
||||
[ext_resource path="res://Art/Steelie.png" type="Texture" id=14]
|
||||
[ext_resource path="res://Art/Corkscrew04.png" type="Texture" id=15]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id=2]
|
||||
bounce = 0.5
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 14 ), ExtResource( 3 ), ExtResource( 12 ), ExtResource( 11 ), ExtResource( 13 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 15 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 9.5
|
||||
|
||||
[node name="Ball" type="RigidBody2D" groups=[
|
||||
"Balls",
|
||||
]]
|
||||
[node name="Ball" type="RigidBody2D" groups=["Balls"]]
|
||||
collision_layer = 15
|
||||
collision_mask = 4
|
||||
mass = 10.0
|
||||
physics_material_override = SubResource( 2 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
scale = Vector2( 0.560606, 0.560606 )
|
||||
texture = ExtResource( 1 )
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
frames = SubResource( 3 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2( 2, 2 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Shine" type="Sprite" parent="."]
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[connection signal="input_event" from="." to="." method="_on_Ball_input_event"]
|
||||
|
Reference in New Issue
Block a user