Fetzi die lustige Landmine

This commit is contained in:
Jakob Feldmann 2023-03-13 22:07:40 +01:00
parent 7ca590b90e
commit e0fa4e24d4
10 changed files with 188 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/mine.png-55e9e23a8f3248d951c24b29401b3412.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/obstacle object/mine.png"
dest_files=[ "res://.import/mine.png-55e9e23a8f3248d951c24b29401b3412.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=2] [gd_scene load_steps=14 format=2]
[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1]
[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2]
@ -9,6 +9,7 @@
[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7]
[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=8]
[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=9]
[ext_resource path="res://src/ObstacleObjects/Mine.tscn" type="PackedScene" id=10]
[ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=12] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=12]
[ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=13] [ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=13]
@ -34,10 +35,10 @@ wait_time = 20.0
drag_margin_bottom = 0.3 drag_margin_bottom = 0.3
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
frame = 10 frame = 3
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
frame = 0 frame = 7
[node name="Blobby" parent="." instance=ExtResource( 2 )] [node name="Blobby" parent="." instance=ExtResource( 2 )]
unique_name_in_owner = true unique_name_in_owner = true
@ -141,6 +142,12 @@ rotation = 1.57079
position = Vector2( 1488, -120 ) position = Vector2( 1488, -120 )
next_scene = ExtResource( 4 ) next_scene = ExtResource( 4 )
[node name="Mine2" parent="." instance=ExtResource( 10 )]
position = Vector2( 20, -9 )
[node name="Mine" parent="." instance=ExtResource( 10 )]
position = Vector2( 21, -27 )
[connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"] [connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"]
[editable path="UserInterface"] [editable path="UserInterface"]

View File

@ -109,7 +109,7 @@ position = Vector2( 72, -168 )
script = ExtResource( 5 ) script = ExtResource( 5 )
[node name="KinematicBody2D" type="KinematicBody2D" parent="FlyingPlatform"] [node name="KinematicBody2D" type="KinematicBody2D" parent="FlyingPlatform"]
collision_layer = 32 collision_layer = 16
collision_mask = 0 collision_mask = 0
motion/sync_to_physics = true motion/sync_to_physics = true

View File

@ -139,7 +139,7 @@ shape = SubResource( 3 )
position = Vector2( 0, 1.5 ) position = Vector2( 0, 1.5 )
z_index = -1 z_index = -1
frames = SubResource( 5 ) frames = SubResource( 5 )
frame = 14 frame = 20
playing = true playing = true
[node name="Portal" parent="." instance=ExtResource( 42 )] [node name="Portal" parent="." instance=ExtResource( 42 )]

View File

@ -34,10 +34,10 @@ unique_name_in_owner = true
drag_margin_bottom = 0.3 drag_margin_bottom = 0.3
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
frame = 2 frame = 4
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
frame = 6 frame = 8
[node name="Blobby" parent="." instance=ExtResource( 2 )] [node name="Blobby" parent="." instance=ExtResource( 2 )]
unique_name_in_owner = true unique_name_in_owner = true

View File

@ -0,0 +1,22 @@
extends Node2D
# Declare member variables here. Examples:
# var a: int = 2
# var b: String = "text"
export var is_locked = true
func _ready() -> void:
$Area2D.remove_from_group("harmful")
$Sprite/AnimationPlayer.play("locked")
func _on_Area2D_area_exited(area: Area2D) -> void:
$Timer.start()
func _on_Timer_timeout() -> void:
is_locked = true
$Area2D.add_to_group("harmful")
$Sprite/AnimationPlayer.play("unlocked")

View File

@ -0,0 +1,117 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/obstacle object/mine.png" type="Texture" id=1]
[ext_resource path="res://src/ObstacleObjects/Mine.gd" type="Script" id=2]
[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 4.0 ]
}
[sub_resource type="Animation" id=3]
resource_name = "locked"
length = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 4.0 ]
}
[sub_resource type="Animation" id=6]
resource_name = "unlocked"
length = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 1 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 7.0 ]
}
[sub_resource type="CircleShape2D" id=7]
resource_local_to_scene = true
radius = 4.0
[node name="Mine" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -0.5 )
texture = ExtResource( 1 )
hframes = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="Sprite"]
anims/RESET = SubResource( 2 )
anims/locked = SubResource( 3 )
anims/unlocked = SubResource( 6 )
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 64
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 7 )
[node name="Timer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[connection signal="area_exited" from="Area2D" to="." method="_on_Area2D_area_exited"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]