first commit

This commit is contained in:
pennyrigate 2022-12-07 02:00:47 -05:00
commit 096ebe5aa4
275 changed files with 3937 additions and 0 deletions

View file

@ -0,0 +1,13 @@
extends Node2D
export var value = 1
func _ready():
#Sync all coinframes
$AnimatedSprite.play()
func _on_Area2D_area_entered(area):
#Collect
if area.is_in_group("player"):
Game.golds += value
queue_free()

View file

@ -0,0 +1,53 @@
[gd_scene load_steps=11 format=2]
[ext_resource path="res://objects/collectibles/gold.gd" type="Script" id=1]
[ext_resource path="res://scripts/recolor_border.shader" type="Shader" id=2]
[ext_resource path="res://graphics/collectibles/coin.png" type="Texture" id=3]
[ext_resource path="res://graphics/collectibles/pal_penny.png" type="Texture" id=4]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 2 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
shader_param/palette = ExtResource( 4 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 3 )
region = Rect2( 8, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 3 )
region = Rect2( 16, 0, 8, 8 )
[sub_resource type="SpriteFrames" id=5]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 3 ) ],
"loop": true,
"name": "default",
"speed": 7.0
} ]
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 4, 4 )
[node name="Gold" type="Node2D"]
script = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
material = SubResource( 1 )
frames = SubResource( 5 )
frame = 1
playing = true
centered = false
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 4, 4 )
shape = SubResource( 6 )
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]

View file

@ -0,0 +1,12 @@
extends Node2D
export var value = 1
func _ready():
$AnimationPlayer.play("glow")
func _on_Area2D_area_entered(area):
#Collect
if area.is_in_group("player"):
Game.shards += value
queue_free()

View file

@ -0,0 +1,50 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1]
[ext_resource path="res://graphics/collectibles/shard.png" type="Texture" id=2]
[ext_resource path="res://objects/collectibles/shard.gd" type="Script" id=3]
[sub_resource type="ShaderMaterial" id=7]
shader = ExtResource( 1 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 5.5, 5.5 )
[sub_resource type="Animation" id=8]
resource_name = "glow"
length = 0.8
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.4, 0.8 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 0.329412, 0.360784, 0.847059, 1 ), Color( 1, 1, 1, 1 ), Color( 0.329412, 0.360784, 0.847059, 1 ) ]
}
[node name="Shard" type="Node2D"]
script = ExtResource( 3 )
[node name="Sprite" type="Sprite" parent="."]
modulate = Color( 0.861621, 0.868095, 0.96844, 1 )
material = SubResource( 7 )
position = Vector2( 5, 3 )
texture = ExtResource( 2 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 4.5, 2.5 )
shape = SubResource( 6 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/glow = SubResource( 8 )
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]

View file

@ -0,0 +1,15 @@
extends Node2D
export var value = 1
func _ready():
#Sync all coinframes
$AnimatedSprite.play()
func _on_Area2D_area_entered(area):
#Collect
if area.is_in_group("player"):
Game.stars += value
#5 Star reward
if Game.stars == 5: Game.shards += 1
queue_free()

View file

@ -0,0 +1,67 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://graphics/collectibles/pal_star_red.png" type="Texture" id=1]
[ext_resource path="res://scripts/recolor_border.shader" type="Shader" id=2]
[ext_resource path="res://objects/collectibles/star.gd" type="Script" id=3]
[ext_resource path="res://graphics/collectibles/star.png" type="Texture" id=4]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 2 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
shader_param/palette = ExtResource( 1 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 4 )
region = Rect2( 11, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 4 )
region = Rect2( 22, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 4 )
region = Rect2( 33, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 4 )
region = Rect2( 44, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 4 )
region = Rect2( 55, 0, 11, 11 )
[sub_resource type="SpriteFrames" id=8]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ) ],
"loop": true,
"name": "default",
"speed": 8.0
} ]
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 4, 4 )
[node name="Star" type="Node2D"]
script = ExtResource( 3 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
material = SubResource( 1 )
position = Vector2( -1, -3 )
frames = SubResource( 8 )
frame = 3
playing = true
centered = false
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
visible = false
position = Vector2( 4, 4 )
shape = SubResource( 9 )
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]