diff --git a/entities/enemy/blue_enemy.tscn b/entities/enemy/blue_enemy.tscn index 87ae7371..8adb67e9 100644 --- a/entities/enemy/blue_enemy.tscn +++ b/entities/enemy/blue_enemy.tscn @@ -79,13 +79,13 @@ tracks/2/keys = { } ] } -[sub_resource type="SpatialMaterial" id=4] +[sub_resource type="SpatialMaterial" id=6] flags_transparent = true params_billboard_mode = 1 albedo_texture = ExtResource( 5 ) [sub_resource type="QuadMesh" id=5] -material = SubResource( 4 ) +material = SubResource( 6 ) size = Vector2( 1.5, 1.5 ) [node name="BlueEnemy" type="KinematicBody" groups=["enemies"]] diff --git a/entities/enemy/purple_enemy.tscn b/entities/enemy/purple_enemy.tscn index b13e7288..ef52aeaa 100644 --- a/entities/enemy/purple_enemy.tscn +++ b/entities/enemy/purple_enemy.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://entities/enemy/blue_enemy.gd" type="Script" id=1] [ext_resource path="res://entities/enemy/purple_enemy.glb" type="PackedScene" id=2] [ext_resource path="res://entities/enemy/prism_area.tscn" type="PackedScene" id=3] [ext_resource path="res://art/slime_jump.ogg" type="AudioStream" id=4] +[ext_resource path="res://entities/enemy/exclamation_mark.png" type="Texture" id=5] [sub_resource type="BoxShape" id=1] extents = Vector3( 1, 1.20057, 1 ) @@ -78,6 +79,15 @@ tracks/2/keys = { } ] } +[sub_resource type="SpatialMaterial" id=4] +flags_transparent = true +params_billboard_mode = 1 +albedo_texture = ExtResource( 5 ) + +[sub_resource type="QuadMesh" id=5] +material = SubResource( 4 ) +size = Vector2( 1.5, 1.5 ) + [node name="PurpleEnemy" type="KinematicBody" groups=["enemies"]] transform = Transform( 6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0 ) collision_layer = 2 @@ -100,16 +110,26 @@ shape = SubResource( 1 ) transform = Transform( 1.21071, 0, 0, 0, 1, 0, 0, 0, 1.7127, 0, 0, 0.28548 ) visible = false +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +autoplay = "float" +anims/float = SubResource( 2 ) +anims/squash = SubResource( 3 ) + [node name="PrismArea" parent="." instance=ExtResource( 3 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -3 ) visible = false monitoring = false monitorable = false -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -autoplay = "float" -anims/float = SubResource( 2 ) -anims/squash = SubResource( 3 ) +[node name="AlertTimer" type="Timer" parent="."] +one_shot = true + +[node name="ExclamationMark" type="MeshInstance" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.2, 0 ) +visible = false +mesh = SubResource( 5 ) +material/0 = null [connection signal="screen_exited" from="VisibilityNotifier" to="." method="_on_VisibilityNotifier_screen_exited"] [connection signal="body_entered" from="PrismArea" to="." method="_on_PrismArea_body_entered"] +[connection signal="timeout" from="AlertTimer" to="." method="_on_AlertTimer_timeout"] diff --git a/maps/mountain_map.tscn b/maps/mountain_map.tscn index e24caef0..3b0fcedb 100644 --- a/maps/mountain_map.tscn +++ b/maps/mountain_map.tscn @@ -11,7 +11,7 @@ [ext_resource path="res://entities/enemy/blue_enemy.tscn" type="PackedScene" id=9] [ext_resource path="res://models/ball/ball.tscn" type="PackedScene" id=10] [ext_resource path="res://models/red_button/red_button.tscn" type="PackedScene" id=11] -[ext_resource path="res://maps/portal_placeholder.tscn" type="PackedScene" id=12] +[ext_resource path="res://props/portal/portal_placeholder.tscn" type="PackedScene" id=12] [ext_resource path="res://models/height_map/Material.material" type="Material" id=13] [sub_resource type="Curve3D" id=1] diff --git a/maps/test_map.tscn b/maps/test_map.tscn index c87ba9e7..ab0b3e57 100644 --- a/maps/test_map.tscn +++ b/maps/test_map.tscn @@ -20,7 +20,7 @@ [ext_resource path="res://models/goweti/goweti.tscn" type="PackedScene" id=18] [ext_resource path="res://models/red_button/red_button.tscn" type="PackedScene" id=19] [ext_resource path="res://entities/enemy/purple_enemy.tscn" type="PackedScene" id=20] -[ext_resource path="res://maps/portal_placeholder.tscn" type="PackedScene" id=21] +[ext_resource path="res://props/portal/portal_placeholder.tscn" type="PackedScene" id=21] [sub_resource type="BoxShape" id=3] extents = Vector3( 30, 1, 30 ) @@ -223,7 +223,8 @@ modifier_stack = Object(Node,"_import_path":NodePath(""),"pause_mode":0,"process ) , Object(Node,"_import_path":NodePath(""),"pause_mode":0,"process_priority":0,"script":Resource( "res://addons/scatter/src/modifiers/randomize_transforms.gd" ),"enabled":true,"display_name":"Randomize Transforms","category":"Edit","warning":"","warning_ignore_no_transforms":false,"warning_ignore_no_path":true,"override_global_seed":false,"custom_seed":0,"local_space":true,"position":Vector3( 0, 0, 0 ),"rotation":Vector3( 0, 180, 0 ),"scale":Vector3( 1, 1, 1 ),"_rng":Object(RandomNumberGenerator,"seed":5570693362334884271,"state":3772973385647095650,"script":null) ) - ],"just_created":false,"undo_redo":null) + ],"just_created":false,"undo_redo":Object(UndoRedo,"script":null) +) [node name="ScatterItem" type="Spatial" parent="Map/Grass"] diff --git a/maps/portal_placeholder.gd b/props/portal/portal_placeholder.gd similarity index 86% rename from maps/portal_placeholder.gd rename to props/portal/portal_placeholder.gd index b3ade953..2e6a6363 100644 --- a/maps/portal_placeholder.gd +++ b/props/portal/portal_placeholder.gd @@ -3,5 +3,6 @@ extends CSGCylinder export var map_name: String func _on_Portal_entered(_body): + #$AudioStreamPlayer.play() GameState.Player.get_node("EffectsAnimationPlayer").play("shrink") GameState.change_map(map_name) diff --git a/maps/portal_placeholder.tscn b/props/portal/portal_placeholder.tscn similarity index 81% rename from maps/portal_placeholder.tscn rename to props/portal/portal_placeholder.tscn index a8c31eca..8ce58a08 100644 --- a/maps/portal_placeholder.tscn +++ b/props/portal/portal_placeholder.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://maps/portal_placeholder.gd" type="Script" id=1] +[ext_resource path="res://props/portal/portal_placeholder.gd" type="Script" id=1] [sub_resource type="SpatialMaterial" id=19] albedo_color = Color( 0.639216, 0.141176, 0.141176, 1 ) @@ -24,4 +24,7 @@ monitorable = false transform = Transform( 3, 0, 0, 0, 0.25, 0, 0, 0, 3, 0, 0, 0 ) shape = SubResource( 20 ) +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +bus = "Sound" + [connection signal="body_entered" from="Area" to="." method="_on_Portal_entered"]