Add mark to the enemy spawn point

This commit is contained in:
Moe Poi ~ 2023-11-19 21:01:37 +07:00
parent 018d017255
commit 214cddded0
12 changed files with 181 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://o2dc3vcnnd4t"
path="res://.godot/imported/enemy-marker-arrow.png-44d7acc461ba0ceb888ccfca827d1199.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/icons/enemy-marker-arrow.png"
dest_files=["res://.godot/imported/enemy-marker-arrow.png-44d7acc461ba0ceb888ccfca827d1199.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bdga2vyi2dpaw"
path="res://.godot/imported/enemy-marker-icon.png-9ee0b010b56cd806a6adcd13a6bfd946.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/icons/enemy-marker-icon.png"
dest_files=["res://.godot/imported/enemy-marker-icon.png-9ee0b010b56cd806a6adcd13a6bfd946.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

46
scenes/marker/marker.tscn Normal file
View file

@ -0,0 +1,46 @@
[gd_scene load_steps=4 format=3 uid="uid://p0lkipd6a5lu"]
[ext_resource type="Texture2D" uid="uid://bdga2vyi2dpaw" path="res://assets/icons/enemy-marker-icon.png" id="1_j1bap"]
[ext_resource type="Script" path="res://scripts/marker/marker.gd" id="1_tysk2"]
[ext_resource type="Texture2D" uid="uid://o2dc3vcnnd4t" path="res://assets/icons/enemy-marker-arrow.png" id="2_f8i1v"]
[node name="marker" type="Node2D"]
script = ExtResource("1_tysk2")
[node name="base" type="Sprite2D" parent="."]
scale = Vector2(0.05, 0.05)
texture = ExtResource("1_j1bap")
[node name="left" type="Sprite2D" parent="."]
visible = false
position = Vector2(-30, 0)
scale = Vector2(0.04, 0.04)
texture = ExtResource("2_f8i1v")
[node name="up" type="Sprite2D" parent="."]
visible = false
position = Vector2(0, -30)
rotation = 1.5708
scale = Vector2(0.04, 0.04)
texture = ExtResource("2_f8i1v")
[node name="down" type="Sprite2D" parent="."]
visible = false
position = Vector2(0, 30)
rotation = 4.71239
scale = Vector2(0.04, 0.04)
texture = ExtResource("2_f8i1v")
[node name="right" type="Sprite2D" parent="."]
visible = false
position = Vector2(30, 0)
rotation = 3.14159
scale = Vector2(0.04, 0.04)
texture = ExtResource("2_f8i1v")
[node name="Timer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
autostart = true
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=3 uid="uid://btdewn34d67m"] [gd_scene load_steps=19 format=3 uid="uid://btdewn34d67m"]
[ext_resource type="Script" path="res://scripts/stages/1/game_manager.gd" id="1_aosti"] [ext_resource type="Script" path="res://scripts/stages/1/game_manager.gd" id="1_aosti"]
[ext_resource type="Texture2D" uid="uid://cnxj0mf3luxo" path="res://assets/tileset/ashlands/tf_A5_ashlands_3.png" id="2_bnj71"] [ext_resource type="Texture2D" uid="uid://cnxj0mf3luxo" path="res://assets/tileset/ashlands/tf_A5_ashlands_3.png" id="2_bnj71"]
@ -13,6 +13,7 @@
[ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_wl8vl"] [ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_wl8vl"]
[ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_huvna"] [ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_huvna"]
[ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_2v5rl"] [ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_2v5rl"]
[ext_resource type="PackedScene" uid="uid://p0lkipd6a5lu" path="res://scenes/marker/marker.tscn" id="13_qa2m6"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_7yb1o"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_7yb1o"]
texture = ExtResource("2_bnj71") texture = ExtResource("2_bnj71")
@ -594,6 +595,10 @@ position = Vector2(1179, 543)
[node name="base3" parent="Bases" instance=ExtResource("8_rsf1n")] [node name="base3" parent="Bases" instance=ExtResource("8_rsf1n")]
position = Vector2(1178, 460) position = Vector2(1178, 460)
[node name="marker" parent="." instance=ExtResource("13_qa2m6")]
position = Vector2(117, 213)
direction = "left"
[node name="Duration" type="Timer" parent="."] [node name="Duration" type="Timer" parent="."]
one_shot = true one_shot = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://bj5auw303w08w"] [gd_scene load_steps=18 format=3 uid="uid://bj5auw303w08w"]
[ext_resource type="Script" path="res://scripts/stages/2/game_manager.gd" id="1_4r6ye"] [ext_resource type="Script" path="res://scripts/stages/2/game_manager.gd" id="1_4r6ye"]
[ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_d077v"] [ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_d077v"]
@ -11,6 +11,7 @@
[ext_resource type="PackedScene" uid="uid://bigsx1yvw0pvg" path="res://scenes/ui/game_duration.tscn" id="7_y7bof"] [ext_resource type="PackedScene" uid="uid://bigsx1yvw0pvg" path="res://scenes/ui/game_duration.tscn" id="7_y7bof"]
[ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_o3n86"] [ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_o3n86"]
[ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_kssjj"] [ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_kssjj"]
[ext_resource type="PackedScene" uid="uid://p0lkipd6a5lu" path="res://scenes/marker/marker.tscn" id="12_unfps"]
[ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_uwk7b"] [ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_uwk7b"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_amj2r"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_amj2r"]
@ -327,6 +328,10 @@ position = Vector2(552, 679)
[node name="base4" parent="Bases" instance=ExtResource("6_e20hd")] [node name="base4" parent="Bases" instance=ExtResource("6_e20hd")]
position = Vector2(509, 680) position = Vector2(509, 680)
[node name="marker" parent="." instance=ExtResource("12_unfps")]
position = Vector2(574, 98)
direction = "up"
[node name="Duration" type="Timer" parent="."] [node name="Duration" type="Timer" parent="."]
one_shot = true one_shot = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3 uid="uid://bxk5llqn5csgu"] [gd_scene load_steps=17 format=3 uid="uid://bxk5llqn5csgu"]
[ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_l1d1t"] [ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_l1d1t"]
[ext_resource type="Script" path="res://scripts/stages/3/game_manager.gd" id="1_u4jwa"] [ext_resource type="Script" path="res://scripts/stages/3/game_manager.gd" id="1_u4jwa"]
@ -12,6 +12,7 @@
[ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_4p6iy"] [ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_4p6iy"]
[ext_resource type="PackedScene" uid="uid://cikgeqqhctm7k" path="res://scenes/base/base.tscn" id="9_057um"] [ext_resource type="PackedScene" uid="uid://cikgeqqhctm7k" path="res://scenes/base/base.tscn" id="9_057um"]
[ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_1fpbf"] [ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_1fpbf"]
[ext_resource type="PackedScene" uid="uid://p0lkipd6a5lu" path="res://scenes/marker/marker.tscn" id="12_wt6oj"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xqebe"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xqebe"]
texture = ExtResource("1_l1d1t") texture = ExtResource("1_l1d1t")
@ -308,6 +309,10 @@ position = Vector2(-37, 541)
[node name="base3" parent="Bases" instance=ExtResource("9_057um")] [node name="base3" parent="Bases" instance=ExtResource("9_057um")]
position = Vector2(-36, 587) position = Vector2(-36, 587)
[node name="marker" parent="." instance=ExtResource("12_wt6oj")]
position = Vector2(733, 82)
direction = "up"
[node name="Duration" type="Timer" parent="."] [node name="Duration" type="Timer" parent="."]
one_shot = true one_shot = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://cxo5fh50r6uxs"] [gd_scene load_steps=18 format=3 uid="uid://cxo5fh50r6uxs"]
[ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_436vn"] [ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_436vn"]
[ext_resource type="Script" path="res://scripts/stages/4/game_manager.gd" id="1_lhtrq"] [ext_resource type="Script" path="res://scripts/stages/4/game_manager.gd" id="1_lhtrq"]
@ -12,6 +12,7 @@
[ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_x1qs2"] [ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_x1qs2"]
[ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_wmgvj"] [ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_wmgvj"]
[ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_8sjqs"] [ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_8sjqs"]
[ext_resource type="PackedScene" uid="uid://p0lkipd6a5lu" path="res://scenes/marker/marker.tscn" id="12_ko7mu"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_8oq7c"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_8oq7c"]
texture = ExtResource("1_436vn") texture = ExtResource("1_436vn")
@ -324,6 +325,10 @@ position = Vector2(910, -44)
[node name="base4" parent="Bases" instance=ExtResource("8_trc1r")] [node name="base4" parent="Bases" instance=ExtResource("8_trc1r")]
position = Vector2(951, -44) position = Vector2(951, -44)
[node name="marker" parent="." instance=ExtResource("12_ko7mu")]
position = Vector2(99, 479)
direction = "left"
[node name="Duration" type="Timer" parent="."] [node name="Duration" type="Timer" parent="."]
one_shot = true one_shot = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://i18iy1wmek4s"] [gd_scene load_steps=18 format=3 uid="uid://i18iy1wmek4s"]
[ext_resource type="Script" path="res://scripts/stages/5/game_manager.gd" id="1_kectu"] [ext_resource type="Script" path="res://scripts/stages/5/game_manager.gd" id="1_kectu"]
[ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_s0uo6"] [ext_resource type="Texture2D" uid="uid://bq6hnxbt4w37u" path="res://assets/tileset/snowland/Snowland@64x64.png" id="1_s0uo6"]
@ -12,6 +12,7 @@
[ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_j6swr"] [ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="8_j6swr"]
[ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_m6s5a"] [ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="9_m6s5a"]
[ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_2xeuw"] [ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_2xeuw"]
[ext_resource type="PackedScene" uid="uid://p0lkipd6a5lu" path="res://scenes/marker/marker.tscn" id="12_c8uq2"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_pf042"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_pf042"]
texture = ExtResource("1_s0uo6") texture = ExtResource("1_s0uo6")
@ -322,6 +323,14 @@ position = Vector2(902, 682)
[node name="base2" parent="Bases" instance=ExtResource("6_yj08v")] [node name="base2" parent="Bases" instance=ExtResource("6_yj08v")]
position = Vector2(947, 681) position = Vector2(947, 681)
[node name="marker" parent="." instance=ExtResource("12_c8uq2")]
position = Vector2(108, 159)
direction = "left"
[node name="marker2" parent="." instance=ExtResource("12_c8uq2")]
position = Vector2(674, 115)
direction = "up"
[node name="Duration" type="Timer" parent="."] [node name="Duration" type="Timer" parent="."]
one_shot = true one_shot = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=3 uid="uid://dcecwku0if8tg"] [gd_scene load_steps=19 format=3 uid="uid://dcecwku0if8tg"]
[ext_resource type="Script" path="res://scripts/stages/6/game_manager.gd" id="1_04mdc"] [ext_resource type="Script" path="res://scripts/stages/6/game_manager.gd" id="1_04mdc"]
[ext_resource type="Texture2D" uid="uid://d36b03p0hs8kw" path="res://assets/tileset/ashlands/ashlands-32x32.png" id="1_a4nl1"] [ext_resource type="Texture2D" uid="uid://d36b03p0hs8kw" path="res://assets/tileset/ashlands/ashlands-32x32.png" id="1_a4nl1"]
@ -12,6 +12,7 @@
[ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="9_pc113"] [ext_resource type="PackedScene" uid="uid://r8kq68v8iflb" path="res://scenes/ui/victory.tscn" id="9_pc113"]
[ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="10_fyg8a"] [ext_resource type="PackedScene" uid="uid://wywjvwp7ausj" path="res://scenes/ui/defeat.tscn" id="10_fyg8a"]
[ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_is64a"] [ext_resource type="AudioStream" uid="uid://bn6agbc77m0au" path="res://assets/audio/stage.mp3" id="12_is64a"]
[ext_resource type="PackedScene" uid="uid://p0lkipd6a5lu" path="res://scenes/marker/marker.tscn" id="12_xutrf"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ebym7"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ebym7"]
texture = ExtResource("1_a4nl1") texture = ExtResource("1_a4nl1")
@ -724,6 +725,17 @@ position = Vector2(106, 667)
[node name="base4" parent="Bases" instance=ExtResource("6_h3kdb")] [node name="base4" parent="Bases" instance=ExtResource("6_h3kdb")]
position = Vector2(149, 667) position = Vector2(149, 667)
[node name="marker" parent="." instance=ExtResource("12_xutrf")]
position = Vector2(135, 131)
direction = "left"
[node name="marker2" parent="." instance=ExtResource("12_xutrf")]
position = Vector2(799, 111)
direction = "up"
[node name="marker3" parent="." instance=ExtResource("12_xutrf")]
position = Vector2(1021, 388)
[node name="Duration" type="Timer" parent="."] [node name="Duration" type="Timer" parent="."]
one_shot = true one_shot = true

20
scripts/marker/marker.gd Normal file
View file

@ -0,0 +1,20 @@
extends Node
@export var direction = "right"
func _ready():
match direction:
"up":
$up.visible = true
"down":
$down.visible = true
"left":
$left.visible = true
"right":
$right.visible = true
_:
$right.visible = true
func _on_timer_timeout():
queue_free()