generated from hertog/godot-module-template
2d template pushed
This commit is contained in:
parent
aa8cc49f4d
commit
4da7e28cb5
73 changed files with 3120 additions and 11 deletions
8
project/coin/coin.gd
Normal file
8
project/coin/coin.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class_name Coin
|
||||
extends Area2D
|
||||
|
||||
var taken = false
|
||||
|
||||
func _on_body_enter(body):
|
||||
if not taken and body is Player:
|
||||
($AnimationPlayer as AnimationPlayer).play("taken")
|
||||
BIN
project/coin/coin.png
Normal file
BIN
project/coin/coin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 212 B |
34
project/coin/coin.png.import
Normal file
34
project/coin/coin.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bio1crwbvrmc2"
|
||||
path="res://.godot/imported/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://coin/coin.png"
|
||||
dest_files=["res://.godot/imported/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
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/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
143
project/coin/coin.tscn
Normal file
143
project/coin/coin.tscn
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://6uilf6rad880"]
|
||||
|
||||
[ext_resource type="Script" path="res://coin/coin.gd" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bio1crwbvrmc2" path="res://coin/coin.png" id="2"]
|
||||
[ext_resource type="AudioStream" uid="uid://cy7lxrapbqu1r" path="res://audio/sound_coin.wav" id="3"]
|
||||
[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="4"]
|
||||
|
||||
[sub_resource type="Animation" id="1"]
|
||||
resource_name = "spin"
|
||||
length = 0.5
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.08325, 0.1665, 0.24975, 0.333, 0.41625, 0.4995),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 1, 2, 3, 2, 1, 0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="2"]
|
||||
length = 3.0
|
||||
step = 0.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("GPUParticles3D:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(2.7),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"queue_free"
|
||||
}]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Sound:playing")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Sprite2D:self_modulate")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.41),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_4atuj"]
|
||||
_data = {
|
||||
"spin": SubResource("1"),
|
||||
"taken": SubResource("2")
|
||||
}
|
||||
|
||||
[sub_resource type="CircleShape2D" id="3"]
|
||||
radius = 5.0
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="4"]
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="Curve" id="5"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.1, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[node name="Coin" type="Area2D"]
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2")
|
||||
hframes = 4
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_4atuj")
|
||||
}
|
||||
autoplay = "spin"
|
||||
|
||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("3")
|
||||
|
||||
[node name="Sound" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("3")
|
||||
|
||||
[node name="GPUParticles3D" type="CPUParticles2D" parent="."]
|
||||
modulate = Color(0.596078, 0.639216, 1, 1)
|
||||
material = SubResource("4")
|
||||
emitting = false
|
||||
lifetime = 0.4
|
||||
one_shot = true
|
||||
explosiveness = 0.7
|
||||
texture = ExtResource("4")
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 4.0
|
||||
gravity = Vector2(0, 0)
|
||||
scale_amount_curve = SubResource("5")
|
||||
|
||||
[node name="Enabler" type="VisibleOnScreenEnabler2D" parent="."]
|
||||
rect = Rect2(-5, -5, 10, 10)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_enter"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue