Compare commits
4 commits
main
...
update/god
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8d904c87e | ||
|
|
ee46149287 | ||
|
|
868810ca82 | ||
|
|
579fc26423 |
46 changed files with 460 additions and 494 deletions
BIN
Assets/Audio/SFX/Test/BadHitSound_coin.ogg
Normal file
BIN
Assets/Audio/SFX/Test/BadHitSound_coin.ogg
Normal file
Binary file not shown.
19
Assets/Audio/SFX/Test/BadHitSound_coin.ogg.import
Normal file
19
Assets/Audio/SFX/Test/BadHitSound_coin.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://c0qfynrgoynwr"
|
||||||
|
path="res://.godot/imported/BadHitSound_coin.ogg-e5c14b8c943c5f7bcce7bd971f08b7d5.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Audio/SFX/Test/BadHitSound_coin.ogg"
|
||||||
|
dest_files=["res://.godot/imported/BadHitSound_coin.ogg-e5c14b8c943c5f7bcce7bd971f08b7d5.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Assets/Audio/SFX/Test/BadHitSound_ktoung.ogg
Normal file
BIN
Assets/Audio/SFX/Test/BadHitSound_ktoung.ogg
Normal file
Binary file not shown.
19
Assets/Audio/SFX/Test/BadHitSound_ktoung.ogg.import
Normal file
19
Assets/Audio/SFX/Test/BadHitSound_ktoung.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://bf50ah0ktnriu"
|
||||||
|
path="res://.godot/imported/BadHitSound_ktoung.ogg-d80938d9e44d3d634fa88c3cc16891ef.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Audio/SFX/Test/BadHitSound_ktoung.ogg"
|
||||||
|
dest_files=["res://.godot/imported/BadHitSound_ktoung.ogg-d80938d9e44d3d634fa88c3cc16891ef.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
|
|
@ -3,39 +3,32 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b7jiyk3w5tl02"
|
uid="uid://b7jiyk3w5tl02"
|
||||||
path.s3tc="res://.godot/imported/Spritesheet_Cakes_WITH_OUTLINE.png-00f0215c11d11c1d402c62a26586b42d.s3tc.ctex"
|
path="res://.godot/imported/Spritesheet_Cakes_WITH_OUTLINE.png-00f0215c11d11c1d402c62a26586b42d.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["s3tc_bptc"],
|
"vram_texture": false
|
||||||
"vram_texture": true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Assets/Icones/Spritesheet_Cakes_WITH_OUTLINE.png"
|
source_file="res://Assets/Icones/Spritesheet_Cakes_WITH_OUTLINE.png"
|
||||||
dest_files=["res://.godot/imported/Spritesheet_Cakes_WITH_OUTLINE.png-00f0215c11d11c1d402c62a26586b42d.s3tc.ctex"]
|
dest_files=["res://.godot/imported/Spritesheet_Cakes_WITH_OUTLINE.png-00f0215c11d11c1d402c62a26586b42d.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=2
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=true
|
mipmaps/generate=false
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
process/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
process/fix_alpha_border=true
|
process/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=0
|
detect_3d/compress_to=1
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ radius = 2.0
|
||||||
[node name="Enemy" parent="." index="0"]
|
[node name="Enemy" parent="." index="0"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.32, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.32, 0)
|
||||||
script = ExtResource("2_vnmiq")
|
script = ExtResource("2_vnmiq")
|
||||||
disableTime = 3.0
|
|
||||||
projectileScene = ExtResource("3_vnmiq")
|
projectileScene = ExtResource("3_vnmiq")
|
||||||
|
disableTime = 3.0
|
||||||
speed = 0.7
|
speed = 0.7
|
||||||
base_attack_damage = 10
|
base_attack_damage = 10
|
||||||
max_life = 300
|
max_life = 300
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,9 @@ class_name Enemy
|
||||||
signal died
|
signal died
|
||||||
|
|
||||||
|
|
||||||
@onready var death_vfx_packed : PackedScene = preload("res://VFX/death_particles.tscn")
|
const DEATH_PARTICLE : PackedScene = preload("uid://ddm57pv5ox171")
|
||||||
@onready var sad_vfx_packed : PackedScene = preload("res://VFX/sad_particles.tscn")
|
const SAD_PARTICLE : PackedScene = preload("uid://m0vj2ac5oesx")
|
||||||
|
|
||||||
|
|
||||||
@export var speed : float = 1
|
@export var speed : float = 1
|
||||||
@export var base_attack_damage : int = 1
|
@export var base_attack_damage : int = 1
|
||||||
|
|
@ -62,7 +63,7 @@ func death() -> void:
|
||||||
died.emit()
|
died.emit()
|
||||||
Game.money += money
|
Game.money += money
|
||||||
$Sprite3D.visible = false
|
$Sprite3D.visible = false
|
||||||
var death_vfx : CPUParticles3D = death_vfx_packed.instantiate()
|
var death_vfx : CPUParticles3D = DEATH_PARTICLE.instantiate()
|
||||||
get_tree().current_scene.add_child(death_vfx)
|
get_tree().current_scene.add_child(death_vfx)
|
||||||
death_vfx.global_position = global_position
|
death_vfx.global_position = global_position
|
||||||
path.queue_free()
|
path.queue_free()
|
||||||
|
|
|
||||||
|
|
@ -1 +1,12 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
func playSFX3D(stream: AudioStream, position: Vector3) -> void:
|
||||||
|
var sfx : AudioStreamPlayer3D = AudioStreamPlayer3D.new()
|
||||||
|
sfx.stream = stream
|
||||||
|
sfx.bus = "SFX"
|
||||||
|
add_child(sfx)
|
||||||
|
sfx.global_position = position
|
||||||
|
sfx.play()
|
||||||
|
await sfx.finished
|
||||||
|
sfx.queue_free()
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ signal team_in_rest_changed(count : int)
|
||||||
|
|
||||||
## [b]Emitter[/b] : [Projectile][br]
|
## [b]Emitter[/b] : [Projectile][br]
|
||||||
## [b]Subscriber[/b] : [code]null[/code]
|
## [b]Subscriber[/b] : [code]null[/code]
|
||||||
signal projectile_shooted(projectile: Projectile, startPosition: Vector3)
|
signal projectile_shooted(projectile: Projectile, transform: Transform3D)
|
||||||
|
|
||||||
|
|
||||||
## [b]Emitter[/b] : [WorldManager][br]
|
## [b]Emitter[/b] : [WorldManager][br]
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ signal lose
|
||||||
signal allowed_tower_has_change
|
signal allowed_tower_has_change
|
||||||
|
|
||||||
|
|
||||||
var upgrades : Array[CubeUpgrade] = load("res://Upgrades/cube_upgrades.tres").upgrades
|
var upgrades : Array[CubeUpgrade] = load("uid://py454tq2ghgx").upgrades
|
||||||
var towerPackedScenes : Dictionary
|
var towerPackedScenes : Dictionary
|
||||||
var enmies : Dictionary
|
var enmies : Dictionary
|
||||||
var towers : Dictionary
|
var towers : Dictionary
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
class_name Helper
|
class_name Helper
|
||||||
|
|
||||||
|
|
||||||
const confirmPopupScene : PackedScene = preload("res://UI/confirm_popup.tscn")
|
const CONFIRM_POPUP : PackedScene = preload("uid://cxn3x8dq8vawa")
|
||||||
|
|
||||||
|
|
||||||
const SCENE_DIR_PATTERN : String = "res://\\w+/(Scenes|Map \\d+)/$"
|
const SCENE_DIR_PATTERN : String = "res://\\w+/(Scenes|Map \\d+)/$"
|
||||||
|
|
@ -73,13 +73,14 @@ static func showConfirmPopup(
|
||||||
text : String,
|
text : String,
|
||||||
nodeToAppend : Node,
|
nodeToAppend : Node,
|
||||||
confirmCallback : Callable,
|
confirmCallback : Callable,
|
||||||
cancelCallback : Callable = func(): null
|
cancelCallback : Callable = func(): pass
|
||||||
) -> void:
|
) -> void:
|
||||||
var confirmPopup : ConfirmPopup = confirmPopupScene.instantiate()
|
var confirmPopup : ConfirmPopup = CONFIRM_POPUP.instantiate()
|
||||||
nodeToAppend.add_child(confirmPopup)
|
nodeToAppend.add_child(confirmPopup)
|
||||||
|
nodeToAppend.get_tree().paused = true
|
||||||
confirmPopup.label.text = text
|
confirmPopup.label.text = text
|
||||||
confirmPopup.confirmed.connect(confirmCallback)
|
confirmPopup.confirmed.connect(func(): confirmCallback.call(); nodeToAppend.get_tree().paused = false)
|
||||||
confirmPopup.canceled.connect(cancelCallback)
|
confirmPopup.canceled.connect(func(): cancelCallback.call(); nodeToAppend.get_tree().paused = false)
|
||||||
|
|
||||||
enum POSITION { TOP, CENTER, DOWN }
|
enum POSITION { TOP, CENTER, DOWN }
|
||||||
static func getHitBoxLocation(body : CollisionObject3D, position : POSITION) -> float:
|
static func getHitBoxLocation(body : CollisionObject3D, position : POSITION) -> float:
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ extends ColorRect
|
||||||
|
|
||||||
enum LOAD_STATE { NO_LOAD, BASIC_LOAD, MAP_LOAD, MAP_LOADED }
|
enum LOAD_STATE { NO_LOAD, BASIC_LOAD, MAP_LOAD, MAP_LOADED }
|
||||||
|
|
||||||
const worldManager = preload("res://Levels/world_manager.tscn")
|
const WORLD_MANAGER = preload("uid://bph5gpic1arod")
|
||||||
|
|
||||||
@export var opaque := 0.0
|
@export var opaque := 0.0
|
||||||
@export var transparent := 11.0
|
@export var transparent := 11.0
|
||||||
|
|
@ -78,7 +78,7 @@ func _process(_delta: float) -> void:
|
||||||
var scene = ResourceLoader.load_threaded_get(target_scene_path)
|
var scene = ResourceLoader.load_threaded_get(target_scene_path)
|
||||||
if loadState == LOAD_STATE.MAP_LOAD:
|
if loadState == LOAD_STATE.MAP_LOAD:
|
||||||
mapScene = scene
|
mapScene = scene
|
||||||
get_tree().change_scene_to_packed(worldManager)
|
get_tree().change_scene_to_packed(WORLD_MANAGER)
|
||||||
loadState = LOAD_STATE.MAP_LOADED
|
loadState = LOAD_STATE.MAP_LOADED
|
||||||
if loadState == LOAD_STATE.BASIC_LOAD:
|
if loadState == LOAD_STATE.BASIC_LOAD:
|
||||||
get_tree().change_scene_to_packed(scene)
|
get_tree().change_scene_to_packed(scene)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Level" load_steps=32 format=3 uid="uid://ob41fnhkjr3o"]
|
[gd_resource type="Resource" script_class="Level" load_steps=21 format=3 uid="uid://ob41fnhkjr3o"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cuhq6u67cbbqm" path="res://Levels/Scripts/Resource/Level.gd" id="1_ftl6b"]
|
[ext_resource type="Script" uid="uid://cuhq6u67cbbqm" path="res://Levels/Scripts/Resource/Level.gd" id="1_ftl6b"]
|
||||||
[ext_resource type="Script" uid="uid://chu8s12rtdeqx" path="res://Levels/Scripts/Resource/Wave.gd" id="2_457yt"]
|
[ext_resource type="Script" uid="uid://chu8s12rtdeqx" path="res://Levels/Scripts/Resource/Wave.gd" id="2_457yt"]
|
||||||
|
|
@ -7,9 +7,7 @@
|
||||||
[sub_resource type="Resource" id="Resource_87wss"]
|
[sub_resource type="Resource" id="Resource_87wss"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "res://Enemies/Scenes/enemy-a.tscn"
|
enemy = "res://Enemies/Scenes/enemy-a.tscn"
|
||||||
number_to_spawn = 4
|
|
||||||
spawn_delay = 2.0
|
spawn_delay = 2.0
|
||||||
pack_delay = 1.0
|
|
||||||
metadata/_custom_type_script = "uid://blxx3vs2wnfet"
|
metadata/_custom_type_script = "uid://blxx3vs2wnfet"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_457yt"]
|
[sub_resource type="Resource" id="Resource_457yt"]
|
||||||
|
|
@ -20,50 +18,32 @@ metadata/_custom_type_script = "uid://chu8s12rtdeqx"
|
||||||
[sub_resource type="Resource" id="Resource_qfjse"]
|
[sub_resource type="Resource" id="Resource_qfjse"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://1kwye5yjf40d"
|
enemy = "uid://1kwye5yjf40d"
|
||||||
number_to_spawn = 5
|
number_to_spawn = 2
|
||||||
spawn_delay = 2.0
|
|
||||||
pack_delay = 0.5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tjxk4"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://r6tj7jprdqib"
|
|
||||||
spawn_delay = 3.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ftl6b"]
|
[sub_resource type="Resource" id="Resource_ftl6b"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://1kwye5yjf40d"
|
enemy = "uid://1kwye5yjf40d"
|
||||||
number_to_spawn = 5
|
|
||||||
spawn_delay = 10.0
|
|
||||||
pack_delay = 0.5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_rgvv8"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://1kwye5yjf40d"
|
|
||||||
number_to_spawn = 2
|
number_to_spawn = 2
|
||||||
spawn_delay = 2.0
|
spawn_delay = 2.0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_jsvwv"]
|
[sub_resource type="Resource" id="Resource_e6yyc"]
|
||||||
|
script = ExtResource("3_ub8wd")
|
||||||
|
enemy = "uid://1kwye5yjf40d"
|
||||||
|
number_to_spawn = 5
|
||||||
|
spawn_delay = 10.0
|
||||||
|
pack_delay = 0.5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_qeljc"]
|
||||||
script = ExtResource("2_457yt")
|
script = ExtResource("2_457yt")
|
||||||
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_qfjse"), SubResource("Resource_tjxk4"), SubResource("Resource_ftl6b"), SubResource("Resource_rgvv8")])
|
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_qfjse"), SubResource("Resource_ftl6b"), SubResource("Resource_e6yyc")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_fhv1k"]
|
[sub_resource type="Resource" id="Resource_fhv1k"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://r6tj7jprdqib"
|
enemy = "uid://r6tj7jprdqib"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_e6yyc"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://koikfh03qv7"
|
|
||||||
number_to_spawn = 3
|
|
||||||
spawn_delay = 10.0
|
|
||||||
pack_delay = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_qh8jg"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://r6tj7jprdqib"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_46oi2"]
|
[sub_resource type="Resource" id="Resource_46oi2"]
|
||||||
script = ExtResource("2_457yt")
|
script = ExtResource("2_457yt")
|
||||||
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_fhv1k"), SubResource("Resource_qfjse"), SubResource("Resource_e6yyc"), SubResource("Resource_ftl6b"), SubResource("Resource_qh8jg")])
|
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_fhv1k"), SubResource("Resource_qfjse"), SubResource("Resource_ftl6b"), SubResource("Resource_e6yyc")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7vcps"]
|
[sub_resource type="Resource" id="Resource_7vcps"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
|
|
@ -71,99 +51,51 @@ enemy = "uid://koikfh03qv7"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_3kmde"]
|
[sub_resource type="Resource" id="Resource_3kmde"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://1kwye5yjf40d"
|
enemy = "uid://koikfh03qv7"
|
||||||
number_to_spawn = 5
|
number_to_spawn = 3
|
||||||
|
spawn_delay = 5.0
|
||||||
pack_delay = 0.3
|
pack_delay = 0.3
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xfp51"]
|
[sub_resource type="Resource" id="Resource_xfp51"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://koikfh03qv7"
|
|
||||||
number_to_spawn = 2
|
|
||||||
spawn_delay = 3.0
|
|
||||||
pack_delay = 0.6
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_q3d8d"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://1kwye5yjf40d"
|
enemy = "uid://1kwye5yjf40d"
|
||||||
number_to_spawn = 5
|
number_to_spawn = 5
|
||||||
spawn_delay = 2.0
|
spawn_delay = 10.0
|
||||||
pack_delay = 0.3
|
pack_delay = 0.4
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ubc0h"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://dyl4wiga2goi"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_lvuiw"]
|
[sub_resource type="Resource" id="Resource_lvuiw"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://r6tj7jprdqib"
|
enemy = "uid://r6tj7jprdqib"
|
||||||
number_to_spawn = 3
|
number_to_spawn = 3
|
||||||
spawn_delay = 10.0
|
|
||||||
pack_delay = 0.5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1514p"]
|
[sub_resource type="Resource" id="Resource_q3d8d"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://1kwye5yjf40d"
|
enemy = "uid://1kwye5yjf40d"
|
||||||
number_to_spawn = 10
|
number_to_spawn = 10
|
||||||
spawn_delay = 3.0
|
spawn_delay = 2.0
|
||||||
pack_delay = 1.0
|
pack_delay = 0.3
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1514p"]
|
||||||
|
script = ExtResource("3_ub8wd")
|
||||||
|
enemy = "uid://koikfh03qv7"
|
||||||
|
number_to_spawn = 4
|
||||||
|
pack_delay = 0.5
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_p2jl5"]
|
[sub_resource type="Resource" id="Resource_p2jl5"]
|
||||||
script = ExtResource("2_457yt")
|
script = ExtResource("2_457yt")
|
||||||
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_7vcps"), SubResource("Resource_3kmde"), SubResource("Resource_xfp51"), SubResource("Resource_q3d8d"), SubResource("Resource_ubc0h"), SubResource("Resource_lvuiw"), SubResource("Resource_1514p")])
|
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_7vcps"), SubResource("Resource_3kmde"), SubResource("Resource_xfp51"), SubResource("Resource_lvuiw"), SubResource("Resource_q3d8d"), SubResource("Resource_1514p")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1nx3f"]
|
[sub_resource type="Resource" id="Resource_1nx3f"]
|
||||||
script = ExtResource("3_ub8wd")
|
script = ExtResource("3_ub8wd")
|
||||||
enemy = "uid://1kwye5yjf40d"
|
enemy = "uid://dyl4wiga2goi"
|
||||||
number_to_spawn = 5
|
|
||||||
spawn_delay = 5.0
|
|
||||||
pack_delay = 0.5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_yuuld"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://r6tj7jprdqib"
|
|
||||||
number_to_spawn = 2
|
|
||||||
spawn_delay = 0.5
|
|
||||||
pack_delay = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_w06di"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://koikfh03qv7"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_nj5d2"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://1kwye5yjf40d"
|
|
||||||
number_to_spawn = 5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_lcpc0"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://koikfh03qv7"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_f1smx"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://1kwye5yjf40d"
|
|
||||||
number_to_spawn = 5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_2okew"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://1kwye5yjf40d"
|
|
||||||
number_to_spawn = 5
|
|
||||||
spawn_delay = 20.0
|
|
||||||
pack_delay = 0.5
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tvv02"]
|
|
||||||
script = ExtResource("3_ub8wd")
|
|
||||||
enemy = "uid://r6tj7jprdqib"
|
|
||||||
number_to_spawn = 2
|
|
||||||
spawn_delay = 0.5
|
|
||||||
pack_delay = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0nx55"]
|
[sub_resource type="Resource" id="Resource_0nx55"]
|
||||||
script = ExtResource("2_457yt")
|
script = ExtResource("2_457yt")
|
||||||
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_1nx3f"), SubResource("Resource_yuuld"), SubResource("Resource_w06di"), SubResource("Resource_nj5d2"), SubResource("Resource_1nx3f"), SubResource("Resource_yuuld"), SubResource("Resource_w06di"), SubResource("Resource_nj5d2"), SubResource("Resource_1nx3f"), SubResource("Resource_yuuld"), SubResource("Resource_yuuld"), SubResource("Resource_w06di"), SubResource("Resource_nj5d2"), SubResource("Resource_1nx3f"), SubResource("Resource_yuuld"), SubResource("Resource_yuuld"), SubResource("Resource_w06di"), SubResource("Resource_nj5d2"), SubResource("Resource_1nx3f"), SubResource("Resource_yuuld"), SubResource("Resource_lcpc0"), SubResource("Resource_f1smx"), SubResource("Resource_2okew"), SubResource("Resource_tvv02"), SubResource("Resource_lcpc0"), SubResource("Resource_f1smx"), SubResource("Resource_2okew"), SubResource("Resource_tvv02"), SubResource("Resource_lcpc0"), SubResource("Resource_f1smx"), SubResource("Resource_2okew"), SubResource("Resource_tvv02"), SubResource("Resource_lcpc0"), SubResource("Resource_f1smx"), SubResource("Resource_2okew"), SubResource("Resource_tvv02"), SubResource("Resource_lcpc0"), SubResource("Resource_f1smx"), SubResource("Resource_2okew")])
|
troops = Array[ExtResource("3_ub8wd")]([SubResource("Resource_1nx3f")])
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_ftl6b")
|
script = ExtResource("1_ftl6b")
|
||||||
allowedTowers = Array[int]([1, 2, 4])
|
allowedTowers = Array[int]([1, 2, 3])
|
||||||
startingMoney = 110
|
startingMoney = 110
|
||||||
waves = Array[ExtResource("2_457yt")]([SubResource("Resource_457yt"), SubResource("Resource_jsvwv"), SubResource("Resource_46oi2"), SubResource("Resource_p2jl5"), SubResource("Resource_0nx55")])
|
waves = Array[ExtResource("2_457yt")]([SubResource("Resource_457yt"), SubResource("Resource_qeljc"), SubResource("Resource_46oi2"), SubResource("Resource_p2jl5"), SubResource("Resource_0nx55")])
|
||||||
metadata/_custom_type_script = "uid://cuhq6u67cbbqm"
|
metadata/_custom_type_script = "uid://cuhq6u67cbbqm"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://dpjfo15otkfru" path="res://Tiles/cube.tscn" id="1_6idm4"]
|
[ext_resource type="PackedScene" uid="uid://dpjfo15otkfru" path="res://Tiles/cube.tscn" id="1_6idm4"]
|
||||||
[ext_resource type="Script" uid="uid://baa0j457hhoeh" path="res://Levels/Scripts/Map.gd" id="1_y62db"]
|
[ext_resource type="Script" uid="uid://baa0j457hhoeh" path="res://Levels/Scripts/Map.gd" id="1_y62db"]
|
||||||
[ext_resource type="PackedScene" uid="uid://d1f6m15niwgt" path="res://Tiles/tile.tscn" id="2_4yqtu"]
|
[ext_resource type="PackedScene" uid="uid://d1f6m15niwgt" path="res://Tiles/tile.tscn" id="2_4yqtu"]
|
||||||
[ext_resource type="Resource" uid="uid://hlv6kd67wipi" path="res://Levels/WIP/Map 2/level_2.tres" id="2_y62db"]
|
[ext_resource type="Resource" uid="uid://hlv6kd67wipi" path="res://Levels/Map 2/level_2.tres" id="2_y62db"]
|
||||||
[ext_resource type="PackedScene" uid="uid://do7gm1gjhu1t5" path="res://Tiles/road.tscn" id="3_y62db"]
|
[ext_resource type="PackedScene" uid="uid://do7gm1gjhu1t5" path="res://Tiles/road.tscn" id="3_y62db"]
|
||||||
[ext_resource type="PackedScene" uid="uid://n0jw4n4qh502" path="res://Tiles/road_corner.tscn" id="4_scukt"]
|
[ext_resource type="PackedScene" uid="uid://n0jw4n4qh502" path="res://Tiles/road_corner.tscn" id="4_scukt"]
|
||||||
[ext_resource type="PackedScene" uid="uid://do60hy3251c0m" path="res://Assets/Meshes/SM_TNP.glb" id="5_o5cso"]
|
[ext_resource type="PackedScene" uid="uid://do60hy3251c0m" path="res://Assets/Meshes/SM_TNP.glb" id="5_o5cso"]
|
||||||
|
|
@ -22,12 +22,12 @@ func _process(_delta: float) -> void:
|
||||||
var mousePosition : Vector2 = get_viewport().get_mouse_position()
|
var mousePosition : Vector2 = get_viewport().get_mouse_position()
|
||||||
|
|
||||||
if mousePosition.x < SCREEN_MARGIN:
|
if mousePosition.x < SCREEN_MARGIN:
|
||||||
position.x += -SCREEN_MOVEMENT_SPEED
|
position.x -= SCREEN_MOVEMENT_SPEED
|
||||||
if mousePosition.y < SCREEN_MARGIN:
|
elif mousePosition.x > windowSize.x - SCREEN_MARGIN:
|
||||||
position.z += -SCREEN_MOVEMENT_SPEED
|
|
||||||
if mousePosition.x > windowSize.x - SCREEN_MARGIN:
|
|
||||||
position.x += SCREEN_MOVEMENT_SPEED
|
position.x += SCREEN_MOVEMENT_SPEED
|
||||||
if mousePosition.y > windowSize.y - SCREEN_MARGIN:
|
if mousePosition.y < SCREEN_MARGIN:
|
||||||
|
position.z -= SCREEN_MOVEMENT_SPEED
|
||||||
|
elif mousePosition.y > windowSize.y - SCREEN_MARGIN:
|
||||||
position.z += SCREEN_MOVEMENT_SPEED
|
position.z += SCREEN_MOVEMENT_SPEED
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -38,9 +38,13 @@ func _notification(what: int) -> void:
|
||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
if not event is InputEventMouseButton:
|
if event is InputEventMouseButton:
|
||||||
return
|
onEventMouseButton(event)
|
||||||
|
elif event is InputEventKey:
|
||||||
|
onEventKey(event)
|
||||||
|
|
||||||
|
|
||||||
|
func onEventMouseButton(event: InputEventMouseButton) -> void:
|
||||||
var newPosition : float = position.y
|
var newPosition : float = position.y
|
||||||
match event.button_index:
|
match event.button_index:
|
||||||
MOUSE_BUTTON_WHEEL_UP: newPosition -= .2
|
MOUSE_BUTTON_WHEEL_UP: newPosition -= .2
|
||||||
|
|
@ -50,3 +54,11 @@ func _input(event: InputEvent) -> void:
|
||||||
|
|
||||||
rotation.x = deg_to_rad(curve.sample(newPosition))
|
rotation.x = deg_to_rad(curve.sample(newPosition))
|
||||||
position.y = newPosition
|
position.y = newPosition
|
||||||
|
|
||||||
|
|
||||||
|
func onEventKey(event: InputEventKey) -> void:
|
||||||
|
match event.keycode:
|
||||||
|
KEY_LEFT: position.x -= SCREEN_MOVEMENT_SPEED * 4
|
||||||
|
KEY_RIGHT: position.x += SCREEN_MOVEMENT_SPEED * 4
|
||||||
|
KEY_UP: position.z -= SCREEN_MOVEMENT_SPEED * 4
|
||||||
|
KEY_DOWN: position.z += SCREEN_MOVEMENT_SPEED * 4
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,6 @@ func addMap(mapScene : PackedScene) -> void:
|
||||||
state = STATE.SPAWN if level.auto_start else STATE.IDLE
|
state = STATE.SPAWN if level.auto_start else STATE.IDLE
|
||||||
|
|
||||||
|
|
||||||
func onProjectileShooted(projectile: Projectile, startPosition: Vector3) -> void:
|
func onProjectileShooted(projectile: Projectile, _transform: Transform3D) -> void:
|
||||||
add_child(projectile)
|
add_child(projectile)
|
||||||
projectile.global_position = startPosition
|
projectile.transform = _transform
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://c5rx5scnkh3fb"]
|
[gd_scene load_steps=9 format=3 uid="uid://c5rx5scnkh3fb"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="1_3pqxv"]
|
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="1_3pqxv"]
|
||||||
[ext_resource type="Script" uid="uid://6xiqssgmiurt" path="res://Projectiles/Draft/impact_pierre.gd" id="2_ymm3v"]
|
|
||||||
|
|
||||||
[sub_resource type="Curve" id="Curve_ymm3v"]
|
[sub_resource type="Curve" id="Curve_ymm3v"]
|
||||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.499044, 1), 0.0, 0.0, 0, 0, Vector2(0.745698, 0.50142), -0.0206361, -0.0206361, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.499044, 1), 0.0, 0.0, 0, 0, Vector2(0.745698, 0.50142), -0.0206361, -0.0206361, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
|
@ -43,9 +42,3 @@ one_shot = true
|
||||||
explosiveness = 1.0
|
explosiveness = 1.0
|
||||||
process_material = SubResource("ParticleProcessMaterial_jk26u")
|
process_material = SubResource("ParticleProcessMaterial_jk26u")
|
||||||
draw_pass_1 = SubResource("QuadMesh_qw7ty")
|
draw_pass_1 = SubResource("QuadMesh_qw7ty")
|
||||||
script = ExtResource("2_ymm3v")
|
|
||||||
|
|
||||||
[node name="SFXImpact" type="AudioStreamPlayer3D" parent="."]
|
|
||||||
bus = &"SFX"
|
|
||||||
|
|
||||||
[connection signal="finished" from="." to="." method="_on_finished"]
|
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
[gd_scene load_steps=8 format=3 uid="uid://dsv2untvmg8q"]
|
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="1_lcll5"]
|
|
||||||
[ext_resource type="Script" uid="uid://bpy86kcsjgx0e" path="res://Projectiles/Draft/projectile_pierre.gd" id="2_i2vf7"]
|
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qaid5"]
|
|
||||||
transparency = 1
|
|
||||||
shading_mode = 0
|
|
||||||
vertex_color_use_as_albedo = true
|
|
||||||
albedo_texture = ExtResource("1_lcll5")
|
|
||||||
billboard_mode = 3
|
|
||||||
particles_anim_h_frames = 1
|
|
||||||
particles_anim_v_frames = 1
|
|
||||||
particles_anim_loop = false
|
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_nkvug"]
|
|
||||||
material = SubResource("StandardMaterial3D_qaid5")
|
|
||||||
size = Vector2(0.2, 0.2)
|
|
||||||
|
|
||||||
[sub_resource type="Curve" id="Curve_lcll5"]
|
|
||||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.509769, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
|
||||||
point_count = 3
|
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_i2vf7"]
|
|
||||||
offsets = PackedFloat32Array(0, 0.379888, 1)
|
|
||||||
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0)
|
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_nlum7"]
|
|
||||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)
|
|
||||||
|
|
||||||
[node name="ProjectilePierre" type="Sprite3D"]
|
|
||||||
billboard = 2
|
|
||||||
texture = ExtResource("1_lcll5")
|
|
||||||
script = ExtResource("2_i2vf7")
|
|
||||||
|
|
||||||
[node name="CPUParticles3D" type="CPUParticles3D" parent="."]
|
|
||||||
amount = 16
|
|
||||||
lifetime = 0.5
|
|
||||||
explosiveness = 0.2
|
|
||||||
mesh = SubResource("QuadMesh_nkvug")
|
|
||||||
emission_shape = 6
|
|
||||||
emission_ring_axis = Vector3(0, 0, 1)
|
|
||||||
emission_ring_height = 0.0
|
|
||||||
emission_ring_radius = 0.3
|
|
||||||
emission_ring_inner_radius = 0.0
|
|
||||||
emission_ring_cone_angle = 90.0
|
|
||||||
direction = Vector3(0, 0, 0)
|
|
||||||
spread = 0.0
|
|
||||||
gravity = Vector3(0, 0, 0)
|
|
||||||
angular_velocity_min = 180.0
|
|
||||||
angular_velocity_max = 360.0
|
|
||||||
scale_amount_min = 0.0
|
|
||||||
scale_amount_curve = SubResource("Curve_lcll5")
|
|
||||||
color_ramp = SubResource("Gradient_i2vf7")
|
|
||||||
color_initial_ramp = SubResource("Gradient_nlum7")
|
|
||||||
|
|
||||||
[node name="SFXCreate" type="AudioStreamPlayer3D" parent="."]
|
|
||||||
bus = &"SFX"
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
extends GPUParticles3D
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
$SFXImpact.play()
|
|
||||||
|
|
||||||
func _on_finished() -> void:
|
|
||||||
queue_free()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://6xiqssgmiurt
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
extends Sprite3D
|
|
||||||
|
|
||||||
var impact : GPUParticles3D = preload("res://Projectiles/Draft/ImpactPierre.tscn").instantiate()
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
$SFXCreate.play()
|
|
||||||
|
|
||||||
func on_impact() -> void:
|
|
||||||
get_tree().root.add_child(impact)
|
|
||||||
queue_free()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bpy86kcsjgx0e
|
|
||||||
|
|
@ -2,27 +2,50 @@ extends CharacterBody3D
|
||||||
class_name Projectile
|
class_name Projectile
|
||||||
|
|
||||||
|
|
||||||
enum MODE {
|
enum State { INIT, TRAVEL, IMPACT, EFFECT, DESPAWN }
|
||||||
FOLLOW, ## Follow Entity
|
|
||||||
LOCATION, ## Go to entity location
|
enum Mode {
|
||||||
HITSCAN, ## DANGER NOT implemented yet
|
FOLLOW, ## Follow target
|
||||||
|
LOCATION, ## Go to target location
|
||||||
|
SPAWN_ON_TARGET, ## Spawn on target location
|
||||||
|
HITSCAN, ## Spawn on target location
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TYPE { ## Types of projectiles
|
enum Effect {
|
||||||
BASIC, ## One target
|
ONE_HIT, ## Make damage on hit
|
||||||
AOE, ## Multiple targets[br]work with [member damageArea]
|
## Make damage every tick for specified duration[br]
|
||||||
PIERCING, ## Piercing through enemies[br]work with [member maxTarets] and [member damageArea]
|
## work with [member dotTicks] for number of tick
|
||||||
BOUNCING, ## Bouncing over enemies[br]work with [member maxTarets] and [member damageArea]
|
DAMAGE_OVER_TIME,
|
||||||
DISABLING, ## Disable ally tower for [member damage] duration [br]Usable on [Boss] projectiles
|
## Make damage over time on hitted target for the specified duration[br]
|
||||||
|
## work with [member dotTicks] for number of tick
|
||||||
|
POISON,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Type { ## Types of projectiles
|
||||||
|
BASIC, ## One defined target
|
||||||
|
AOE, ## Multiple targets
|
||||||
|
BOUNCING, ## Bouncing over enemies[br]work with [member maxTargets]
|
||||||
|
DISABLING, ## Disable ally tower for [member amount] duration [br]Usable on [Boss] projectiles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@export var type : TYPE = TYPE.BASIC
|
@export var mode : Mode = Mode.FOLLOW
|
||||||
@export var mode : MODE = MODE.FOLLOW
|
@export var effect : Effect = Effect.ONE_HIT
|
||||||
|
@export var type : Type = Type.BASIC
|
||||||
@export var speed : int
|
@export var speed : int
|
||||||
|
## Usefull when [enum Type] is not [constant BASIC][br][code]-1[/code] for no maximum
|
||||||
@export var maxTargets : int = 1
|
@export var maxTargets : int = 1
|
||||||
|
## The amount of ticks
|
||||||
|
## Used as time when [enum Effect] is [constant DAMAGE_OVER_TIME] or [constant POISON]
|
||||||
|
@export var dotTicks : int
|
||||||
|
@export var tickInterval : float ##
|
||||||
|
|
||||||
|
@export_group("Sounds - Animations")
|
||||||
|
@export var impactScene : PackedScene
|
||||||
|
@export var shootSFX : AudioStream
|
||||||
|
@export var impactSFX : AudioStream
|
||||||
|
|
||||||
|
var state : State = State.INIT
|
||||||
var amount : float
|
var amount : float
|
||||||
var target : PhysicsBody3D
|
var target : PhysicsBody3D
|
||||||
var vectorTarget : Vector3
|
var vectorTarget : Vector3
|
||||||
|
|
@ -31,118 +54,149 @@ var collidingBodies : Array[Node3D]
|
||||||
var affectedTarget : Array[Node3D]
|
var affectedTarget : Array[Node3D]
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$HitBox.body_entered.connect(collidingBodies.append)
|
||||||
|
$HitBox.body_exited.connect(collidingBodies.erase)
|
||||||
|
$EffectArea.body_entered.connect(bodiesInRange.append)
|
||||||
|
$EffectArea.body_exited.connect(bodiesInRange.erase)
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(_delta: float) -> void:
|
func _physics_process(_delta: float) -> void:
|
||||||
if mode == MODE.LOCATION && vectorTarget.distance_squared_to(global_position) < .4:
|
if state == State.INIT:
|
||||||
resolveContact()
|
if shootSFX:
|
||||||
maxTargets = 0 # Ensure queue free in next if
|
AudioManager.playSFX3D(shootSFX, global_position)
|
||||||
|
state = State.TRAVEL
|
||||||
|
return
|
||||||
|
|
||||||
|
match state:
|
||||||
|
State.TRAVEL when isOnTarget():
|
||||||
|
state = State.IMPACT
|
||||||
|
return
|
||||||
|
State.TRAVEL:
|
||||||
|
if mode == Mode.FOLLOW:
|
||||||
|
var globalPos : Vector3 = target.global_position
|
||||||
|
globalPos.y += Helper.getHitBoxLocation(target, Helper.POSITION.CENTER)
|
||||||
|
look_at(globalPos)
|
||||||
|
velocity = global_position.direction_to(globalPos) * speed
|
||||||
|
move_and_slide()
|
||||||
|
State.IMPACT:
|
||||||
|
state = State.EFFECT
|
||||||
|
impactAnimations()
|
||||||
|
applyEffects()
|
||||||
|
State.EFFECT: return
|
||||||
|
State.DESPAWN:
|
||||||
|
queue_free.call_deferred()
|
||||||
|
|
||||||
if shouldQueueFree():
|
if shouldQueueFree():
|
||||||
return queue_free()
|
state = State.DESPAWN
|
||||||
|
|
||||||
if not collidingBodies.is_empty() && collidingBodies.has(target):
|
|
||||||
return onBodyCollideWithProjectile(target)
|
|
||||||
|
|
||||||
var globalPos : Vector3 = vectorTarget if vectorTarget else target.global_position
|
|
||||||
if target:
|
|
||||||
globalPos.y += Helper.getHitBoxLocation(target, Helper.POSITION.CENTER)
|
|
||||||
look_at(globalPos)
|
|
||||||
velocity = global_position.direction_to(globalPos) * speed
|
|
||||||
move_and_slide()
|
|
||||||
|
|
||||||
|
|
||||||
func shouldQueueFree() -> bool:
|
func shouldQueueFree() -> bool:
|
||||||
if maxTargets < 1:
|
|
||||||
return true
|
|
||||||
|
|
||||||
if !is_instance_valid(target):
|
if !is_instance_valid(target):
|
||||||
return mode == MODE.FOLLOW
|
return mode == Mode.FOLLOW || maxTargets == 0
|
||||||
elif target is Tower:
|
elif target is Tower:
|
||||||
return not target.visible
|
return not target.visible
|
||||||
|
|
||||||
return false
|
return maxTargets == 0
|
||||||
|
|
||||||
|
|
||||||
func onBodyEnteredDamageArea(body: Node3D) -> void:
|
func impactAnimations() -> void:
|
||||||
if type != TYPE.BASIC && targetable(body):
|
if impactSFX:
|
||||||
addBodyInRange(body)
|
AudioManager.playSFX3D(impactSFX, global_position)
|
||||||
if type == TYPE.PIERCING:
|
if impactScene:
|
||||||
resolveContact()
|
var impact : GPUParticles3D = impactScene.instantiate()
|
||||||
|
impact.finished.connect(impact.queue_free)
|
||||||
|
get_tree().root.add_child(impact)
|
||||||
|
impact.emitting = false
|
||||||
|
impact.one_shot = true
|
||||||
|
impact.emitting = true
|
||||||
|
|
||||||
|
|
||||||
func onBodyCollideWithProjectile(body: Node3D) -> void:
|
func isOnTarget() -> bool:
|
||||||
if not collidingBodies.has(body):
|
match mode:
|
||||||
collidingBodies.push_back(body)
|
Mode.LOCATION: return vectorTarget.distance_squared_to(global_position) < .4
|
||||||
|
Mode.FOLLOW: return collidingBodies.has(target)
|
||||||
if mode != MODE.LOCATION && (body == target || type == TYPE.PIERCING) && targetable(body):
|
Mode.HITSCAN, Mode.SPAWN_ON_TARGET: return true
|
||||||
addBodyInRange(body, true)
|
_: return false
|
||||||
resolveContact()
|
|
||||||
|
|
||||||
|
|
||||||
func addBodyInRange(body: Node3D, pushFront: bool = false) -> void:
|
func applyEffects() -> void:
|
||||||
var idx : int = bodiesInRange.find(body)
|
if not collidingBodies.is_empty() && isOnTarget():
|
||||||
|
resolveContacts()
|
||||||
|
|
||||||
if idx == -1:
|
if state != State.TRAVEL:
|
||||||
if pushFront:
|
state = State.DESPAWN
|
||||||
bodiesInRange.push_front(body)
|
if effect == Effect.DAMAGE_OVER_TIME:
|
||||||
else:
|
dotTicks -= 1
|
||||||
bodiesInRange.push_back(body)
|
if dotTicks > 0:
|
||||||
elif pushFront && idx != 0:
|
state = State.EFFECT
|
||||||
bodiesInRange.remove_at(idx)
|
await get_tree().create_timer(tickInterval).timeout
|
||||||
bodiesInRange.push_front(body)
|
applyEffects.call_deferred()
|
||||||
|
|
||||||
|
|
||||||
func targetable(body: Node3D) -> bool:
|
func resolveContacts() -> void:
|
||||||
return not affectedTarget.has(body)
|
|
||||||
|
|
||||||
|
|
||||||
func resolveContact() -> void:
|
|
||||||
if bodiesInRange.is_empty():
|
|
||||||
return
|
|
||||||
|
|
||||||
resolveEffect(bodiesInRange[0])
|
|
||||||
|
|
||||||
match type:
|
match type:
|
||||||
TYPE.AOE:
|
Type.AOE:
|
||||||
for bodyInRange in bodiesInRange:
|
if maxTargets > 0: # No need to sort if we want to hit all targets
|
||||||
if is_instance_valid(bodyInRange):
|
collidingBodies.sort_custom(sortTargets)
|
||||||
resolveEffect(bodyInRange, false)
|
collidingBodies.map(resolveEffect)
|
||||||
|
_ when collidingBodies.has(target):
|
||||||
TYPE.BOUNCING:
|
resolveEffect(target)
|
||||||
target = null if bodiesInRange.is_empty() else bodiesInRange[0]
|
if type == Type.BOUNCING:
|
||||||
|
target = chooseNextTarget()
|
||||||
|
state = State.TRAVEL
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
func resolveEffect(body : Node3D, erase : bool = true) -> void:
|
func sortTargets(body1: Node3D, body2: Node3D) -> bool:
|
||||||
if erase:
|
return vectorTarget.distance_to(body1.global_position) < vectorTarget.distance_to(body2.global_position)
|
||||||
bodiesInRange.erase(body)
|
|
||||||
if affectedTarget.has(body) || body is GameTile:
|
|
||||||
|
func chooseNextTarget() -> Node3D:
|
||||||
|
var bodies = bodiesInRange.filter(func(body): return not affectedTarget.has(body))
|
||||||
|
if bodies.is_empty():
|
||||||
|
return null
|
||||||
|
bodies.sort_custom(sortTargets)
|
||||||
|
return bodies[0]
|
||||||
|
|
||||||
|
|
||||||
|
func resolveEffect(body: Node3D) -> void:
|
||||||
|
if body is GameTile || maxTargets == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
if type == TYPE.DISABLING && body.has_method("disable"):
|
if type == Type.DISABLING && body.has_method("disable"):
|
||||||
body.disable(amount)
|
body.disable(amount)
|
||||||
elif body.has_method("take_damage"):
|
elif body.has_method("take_damage"):
|
||||||
body.take_damage(amount)
|
body.take_damage(amount)
|
||||||
|
|
||||||
|
if effect == Effect.POISON:
|
||||||
|
var poisonTicks : int = dotTicks - 1
|
||||||
|
while poisonTicks > 0 && is_instance_valid(body):
|
||||||
|
poisonTicks -= 1
|
||||||
|
await get_tree().create_timer(tickInterval).timeout
|
||||||
|
body.take_damage(amount)
|
||||||
|
|
||||||
affectedTarget.append(body)
|
affectedTarget.append(body)
|
||||||
maxTargets -= 1
|
maxTargets -= 1
|
||||||
|
|
||||||
|
|
||||||
func removeTarget(body: Node3D) -> void:
|
|
||||||
bodiesInRange.erase(body)
|
|
||||||
|
|
||||||
|
|
||||||
func removeCollidingBody(body: Node3D) -> void:
|
|
||||||
collidingBodies.erase(body)
|
|
||||||
|
|
||||||
|
|
||||||
func shoot(_target: Node3D, globalPos: Vector3) -> void:
|
func shoot(_target: Node3D, globalPos: Vector3) -> void:
|
||||||
target = _target
|
target = _target
|
||||||
|
vectorTarget = globalPos
|
||||||
|
|
||||||
|
var transform3D : Transform3D = Transform3D()
|
||||||
|
transform3D.origin = globalPos
|
||||||
|
|
||||||
|
var targetPosition : Vector3 = target.global_position
|
||||||
|
targetPosition.y += Helper.getHitBoxLocation(target, Helper.POSITION.CENTER)
|
||||||
|
transform3D = transform3D.looking_at(targetPosition)
|
||||||
match mode:
|
match mode:
|
||||||
Projectile.MODE.HITSCAN:
|
Mode.SPAWN_ON_TARGET:
|
||||||
globalPos = target.global_position
|
vectorTarget = targetPosition
|
||||||
globalPos.y += Helper.getHitBoxLocation(target, Helper.POSITION.CENTER)
|
transform3D.origin = targetPosition
|
||||||
Projectile.MODE.LOCATION:
|
transform3D = transform3D.looking_at(globalPos)
|
||||||
vectorTarget = target.global_position
|
Mode.LOCATION:
|
||||||
vectorTarget.y += Helper.getHitBoxLocation(target, Helper.POSITION.CENTER)
|
vectorTarget = targetPosition
|
||||||
|
velocity = transform3D.origin.direction_to(vectorTarget) * speed
|
||||||
|
|
||||||
EventBus.projectile_shooted.emit(self, globalPos)
|
EventBus.projectile_shooted.emit(self, transform3D)
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,24 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://dcnm6rjht0rew"]
|
[gd_scene load_steps=4 format=3 uid="uid://dcnm6rjht0rew"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_4tmpc"]
|
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_4tmpc"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="2_dl8a6"]
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_k24mn"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_2ioqj"]
|
||||||
radius = 0.3
|
radius = 0.3
|
||||||
|
|
||||||
[node name="Projectile" instance=ExtResource("1_4tmpc")]
|
[node name="Projectile" instance=ExtResource("1_4tmpc")]
|
||||||
type = 1
|
|
||||||
mode = 1
|
mode = 1
|
||||||
|
type = 1
|
||||||
speed = 3
|
speed = 3
|
||||||
damage = 6
|
maxTargets = -1
|
||||||
|
|
||||||
[node name="HitBox" parent="." index="2"]
|
[node name="HitBox" parent="." index="1"]
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
|
|
||||||
[node name="DamageArea" parent="." index="3"]
|
[node name="ProjectileSize" parent="HitBox" index="0"]
|
||||||
collision_mask = 2
|
shape = SubResource("SphereShape3D_2ioqj")
|
||||||
|
|
||||||
[node name="Node" type="CollisionShape3D" parent="DamageArea" index="0"]
|
[node name="Sprite3D" type="Sprite3D" parent="." index="3"]
|
||||||
shape = SubResource("SphereShape3D_k24mn")
|
transform = Transform3D(2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 0, 0)
|
||||||
|
billboard = 2
|
||||||
|
texture = ExtResource("2_dl8a6")
|
||||||
|
|
|
||||||
41
Projectiles/Scenes/projectile-Evan.tscn
Normal file
41
Projectiles/Scenes/projectile-Evan.tscn
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
[gd_scene load_steps=7 format=3 uid="uid://dp8tg6cpu3ftd"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_yw5ty"]
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_xshf4"]
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_yw5ty"]
|
||||||
|
offsets = PackedFloat32Array(0, 0.5, 1)
|
||||||
|
colors = PackedColorArray(1, 0.007843138, 0, 1, 1, 0.54901963, 0, 1, 1, 0, 0, 1)
|
||||||
|
metadata/_snap_enabled = true
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_xshf4"]
|
||||||
|
gradient = SubResource("Gradient_yw5ty")
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yw5ty"]
|
||||||
|
transparency = 4
|
||||||
|
albedo_color = Color(1, 1, 1, 0.43137255)
|
||||||
|
albedo_texture = SubResource("GradientTexture1D_xshf4")
|
||||||
|
|
||||||
|
[sub_resource type="SphereMesh" id="SphereMesh_q317a"]
|
||||||
|
material = SubResource("StandardMaterial3D_yw5ty")
|
||||||
|
|
||||||
|
[node name="Projectile" instance=ExtResource("1_yw5ty")]
|
||||||
|
mode = 2
|
||||||
|
effect = 1
|
||||||
|
type = 1
|
||||||
|
maxTargets = -1
|
||||||
|
dotTicks = 6
|
||||||
|
tickInterval = 0.5
|
||||||
|
|
||||||
|
[node name="Sprite3D" parent="." index="1"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="HitBox" parent="." index="2"]
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
|
[node name="ProjectileSize" parent="HitBox" index="0"]
|
||||||
|
shape = SubResource("SphereShape3D_xshf4")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="." index="4"]
|
||||||
|
mesh = SubResource("SphereMesh_q317a")
|
||||||
|
|
@ -4,16 +4,16 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://b7jiyk3w5tl02" path="res://Assets/Icones/Spritesheet_Cakes_WITH_OUTLINE.png" id="2_ckawd"]
|
[ext_resource type="Texture2D" uid="uid://b7jiyk3w5tl02" path="res://Assets/Icones/Spritesheet_Cakes_WITH_OUTLINE.png" id="2_ckawd"]
|
||||||
|
|
||||||
[node name="Projectile" instance=ExtResource("1_do0ca")]
|
[node name="Projectile" instance=ExtResource("1_do0ca")]
|
||||||
type = 4
|
type = 3
|
||||||
speed = 2
|
speed = 2
|
||||||
damage = 3
|
|
||||||
|
|
||||||
[node name="Sprite3D" parent="." index="1"]
|
[node name="HitBox" parent="." index="1"]
|
||||||
|
collision_mask = 4
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="." index="3"]
|
||||||
transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 0, 0, 0)
|
transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 0, 0, 0)
|
||||||
|
billboard = 2
|
||||||
texture = ExtResource("2_ckawd")
|
texture = ExtResource("2_ckawd")
|
||||||
hframes = 6
|
hframes = 6
|
||||||
vframes = 2
|
vframes = 2
|
||||||
frame = 11
|
frame = 11
|
||||||
|
|
||||||
[node name="HitBox" parent="." index="2"]
|
|
||||||
collision_mask = 4
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,66 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://dy755v20lqu7q"]
|
[gd_scene load_steps=11 format=3 uid="uid://dy755v20lqu7q"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_d01p1"]
|
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_d01p1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="2_5lxlg"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c5rx5scnkh3fb" path="res://Projectiles/Draft/ImpactPierre.tscn" id="2_s3rfh"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://c0qfynrgoynwr" path="res://Assets/Audio/SFX/Test/BadHitSound_coin.ogg" id="4_r8d72"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bf50ah0ktnriu" path="res://Assets/Audio/SFX/Test/BadHitSound_ktoung.ogg" id="4_s3rfh"]
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qaid5"]
|
||||||
|
transparency = 1
|
||||||
|
shading_mode = 0
|
||||||
|
vertex_color_use_as_albedo = true
|
||||||
|
albedo_texture = ExtResource("2_5lxlg")
|
||||||
|
billboard_mode = 3
|
||||||
|
particles_anim_h_frames = 1
|
||||||
|
particles_anim_v_frames = 1
|
||||||
|
particles_anim_loop = false
|
||||||
|
|
||||||
|
[sub_resource type="QuadMesh" id="QuadMesh_nkvug"]
|
||||||
|
material = SubResource("StandardMaterial3D_qaid5")
|
||||||
|
size = Vector2(0.2, 0.2)
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_lcll5"]
|
||||||
|
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.509769, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 3
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_i2vf7"]
|
||||||
|
offsets = PackedFloat32Array(0, 0.379888, 1)
|
||||||
|
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0)
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_nlum7"]
|
||||||
|
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)
|
||||||
|
|
||||||
[node name="Projectile" instance=ExtResource("1_d01p1")]
|
[node name="Projectile" instance=ExtResource("1_d01p1")]
|
||||||
speed = 15
|
speed = 15
|
||||||
damage = 2
|
impactScene = ExtResource("2_s3rfh")
|
||||||
|
shootSFX = ExtResource("4_r8d72")
|
||||||
|
impactSFX = ExtResource("4_s3rfh")
|
||||||
|
|
||||||
[node name="HitBox" parent="." index="2"]
|
[node name="HitBox" parent="." index="1"]
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
|
|
||||||
|
[node name="ProjectilePierre" type="Sprite3D" parent="." index="3"]
|
||||||
|
billboard = 2
|
||||||
|
texture = ExtResource("2_5lxlg")
|
||||||
|
|
||||||
|
[node name="CPUParticles3D" type="CPUParticles3D" parent="ProjectilePierre" index="0"]
|
||||||
|
amount = 16
|
||||||
|
lifetime = 0.5
|
||||||
|
explosiveness = 0.2
|
||||||
|
mesh = SubResource("QuadMesh_nkvug")
|
||||||
|
emission_shape = 6
|
||||||
|
emission_ring_axis = Vector3(0, 0, 1)
|
||||||
|
emission_ring_height = 0.0
|
||||||
|
emission_ring_radius = 0.3
|
||||||
|
emission_ring_inner_radius = 0.0
|
||||||
|
emission_ring_cone_angle = 90.0
|
||||||
|
direction = Vector3(0, 0, 0)
|
||||||
|
spread = 0.0
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
angular_velocity_min = 180.0
|
||||||
|
angular_velocity_max = 360.0
|
||||||
|
scale_amount_min = 0.0
|
||||||
|
scale_amount_curve = SubResource("Curve_lcll5")
|
||||||
|
color_ramp = SubResource("Gradient_i2vf7")
|
||||||
|
color_initial_ramp = SubResource("Gradient_nlum7")
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,25 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://df8u7dogl4wi0"]
|
[gd_scene load_steps=4 format=3 uid="uid://df8u7dogl4wi0"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_suva6"]
|
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_suva6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="2_4juxc"]
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_k24mn"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_878kj"]
|
||||||
radius = 1.5
|
|
||||||
|
|
||||||
[node name="Projectile" instance=ExtResource("1_suva6")]
|
[node name="Projectile" instance=ExtResource("1_suva6")]
|
||||||
type = 3
|
type = 2
|
||||||
speed = 10
|
speed = 5
|
||||||
maxTargets = 3
|
maxTargets = 3
|
||||||
|
|
||||||
[node name="HitBox" parent="." index="2"]
|
[node name="HitBox" parent="." index="1"]
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
|
|
||||||
[node name="DamageArea" parent="." index="3"]
|
[node name="EffectArea" parent="." index="2"]
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
|
|
||||||
[node name="BoucingRange" type="CollisionShape3D" parent="DamageArea" index="0"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="EffectArea" index="0"]
|
||||||
shape = SubResource("SphereShape3D_k24mn")
|
shape = SubResource("SphereShape3D_878kj")
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="." index="3"]
|
||||||
|
transform = Transform3D(2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 0, 0)
|
||||||
|
billboard = 2
|
||||||
|
texture = ExtResource("2_4juxc")
|
||||||
|
|
|
||||||
25
Projectiles/Scenes/projectile-maxence.tscn
Normal file
25
Projectiles/Scenes/projectile-maxence.tscn
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://baixm8pfsdo3t"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://oykrff3g74eo" path="res://Projectiles/projectile.tscn" id="1_a1h27"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="2_lwnvl"]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_a1h27"]
|
||||||
|
radius = 0.1
|
||||||
|
height = 10.0
|
||||||
|
|
||||||
|
[node name="Projectile" instance=ExtResource("1_a1h27")]
|
||||||
|
mode = 3
|
||||||
|
type = 1
|
||||||
|
maxTargets = 5
|
||||||
|
|
||||||
|
[node name="HitBox" parent="." index="1"]
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
|
[node name="ProjectileSize" parent="HitBox" index="0"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, -5)
|
||||||
|
shape = SubResource("CapsuleShape3D_a1h27")
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="." index="3"]
|
||||||
|
transform = Transform3D(2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 0, 0)
|
||||||
|
billboard = 2
|
||||||
|
texture = ExtResource("2_lwnvl")
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://oykrff3g74eo"]
|
[gd_scene load_steps=4 format=3 uid="uid://oykrff3g74eo"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b788twwo1o6l2" path="res://Projectiles/Projectile.gd" id="1_ggq0q"]
|
[ext_resource type="Script" uid="uid://b788twwo1o6l2" path="res://Projectiles/Projectile.gd" id="1_ggq0q"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="2_08w86"]
|
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_r5o86"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_r5o86"]
|
||||||
radius = 0.1
|
radius = 0.1
|
||||||
|
|
@ -17,11 +16,6 @@ script = ExtResource("1_ggq0q")
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
shape = SubResource("SphereShape3D_r5o86")
|
shape = SubResource("SphereShape3D_r5o86")
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
|
||||||
transform = Transform3D(2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 0, 0)
|
|
||||||
billboard = 2
|
|
||||||
texture = ExtResource("2_08w86")
|
|
||||||
|
|
||||||
[node name="HitBox" type="Area3D" parent="."]
|
[node name="HitBox" type="Area3D" parent="."]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
|
|
@ -30,11 +24,6 @@ collision_mask = 0
|
||||||
shape = SubResource("SphereShape3D_dsts2")
|
shape = SubResource("SphereShape3D_dsts2")
|
||||||
debug_color = Color(0.926858, 0.237749, 0.335021, 0.42)
|
debug_color = Color(0.926858, 0.237749, 0.335021, 0.42)
|
||||||
|
|
||||||
[node name="DamageArea" type="Area3D" parent="."]
|
[node name="EffectArea" type="Area3D" parent="."]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
|
|
||||||
[connection signal="body_entered" from="HitBox" to="." method="onBodyCollideWithProjectile" flags=3]
|
|
||||||
[connection signal="body_exited" from="HitBox" to="." method="removeCollidingBody"]
|
|
||||||
[connection signal="body_entered" from="DamageArea" to="." method="onBodyEnteredDamageArea"]
|
|
||||||
[connection signal="body_exited" from="DamageArea" to="." method="removeTarget"]
|
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,13 @@
|
||||||
[gd_scene load_steps=12 format=3 uid="uid://ck1qryleu80s"]
|
[gd_scene load_steps=7 format=3 uid="uid://ck1qryleu80s"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_gvvig"]
|
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_gvvig"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cob1lydkirn20" path="res://Assets/Icones/raccoon-head.svg" id="3_6h033"]
|
[ext_resource type="Texture2D" uid="uid://cob1lydkirn20" path="res://Assets/Icones/raccoon-head.svg" id="3_6h033"]
|
||||||
[ext_resource type="Script" uid="uid://bg0x4egeu17qb" path="res://Upgrades/TowerUpgrade.gd" id="4_6bcjo"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dcnm6rjht0rew" path="res://Projectiles/Scenes/projectile-Aline.tscn" id="5_6bcjo"]
|
[ext_resource type="PackedScene" uid="uid://dcnm6rjht0rew" path="res://Projectiles/Scenes/projectile-Aline.tscn" id="5_6bcjo"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dqvou7t7o1t5d" path="res://Assets/Icones/medal2.png" id="5_j53a1"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://315k07rsgf6t" path="res://Assets/Characters/Female1.png" id="5_l514g"]
|
[ext_resource type="Texture2D" uid="uid://315k07rsgf6t" path="res://Assets/Characters/Female1.png" id="5_l514g"]
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_6bcjo"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_6bcjo"]
|
||||||
radius = 3.0
|
radius = 3.0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_bxjwg"]
|
|
||||||
script = ExtResource("4_6bcjo")
|
|
||||||
baseCost = 100
|
|
||||||
value = 100.0
|
|
||||||
maxLevel = 1
|
|
||||||
costModificator = 100.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_x2qek"]
|
|
||||||
script = ExtResource("4_6bcjo")
|
|
||||||
type = 2
|
|
||||||
baseCost = 100
|
|
||||||
value = 5.0
|
|
||||||
maxLevel = 1
|
|
||||||
upgradeDirection = -1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cunx5"]
|
|
||||||
script = ExtResource("4_6bcjo")
|
|
||||||
type = 3
|
|
||||||
baseCost = 200
|
|
||||||
value = 3.0
|
|
||||||
maxLevel = 1
|
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_gjbai"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_gjbai"]
|
||||||
viewport_path = NodePath("EnergyBar3D/SubViewport")
|
viewport_path = NodePath("EnergyBar3D/SubViewport")
|
||||||
|
|
||||||
|
|
@ -48,7 +24,6 @@ action_cooldown = 2.5
|
||||||
max_energy = 100.0
|
max_energy = 100.0
|
||||||
energy_regen = 10.0
|
energy_regen = 10.0
|
||||||
energy_cost = 25.0
|
energy_cost = 25.0
|
||||||
upgrades = Array[ExtResource("4_6bcjo")]([SubResource("Resource_bxjwg"), SubResource("Resource_x2qek"), SubResource("Resource_cunx5")])
|
|
||||||
|
|
||||||
[node name="Sprite3D" parent="." index="5"]
|
[node name="Sprite3D" parent="." index="5"]
|
||||||
texture = ExtResource("5_l514g")
|
texture = ExtResource("5_l514g")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://c4ta0aynybpis"]
|
[gd_scene load_steps=6 format=3 uid="uid://c4ta0aynybpis"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_yctfx"]
|
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_yctfx"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dwwgho6f8f4kj" path="res://Assets/Icones/penguin.svg" id="2_5uh04"]
|
[ext_resource type="Texture2D" uid="uid://dwwgho6f8f4kj" path="res://Assets/Icones/penguin.svg" id="2_5uh04"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dp8tg6cpu3ftd" path="res://Projectiles/Scenes/projectile-Evan.tscn" id="3_5uh04"]
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_y05yr"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_y05yr"]
|
||||||
radius = 4.0
|
radius = 4.0
|
||||||
|
|
@ -14,7 +15,14 @@ tower_name = "Evan"
|
||||||
type = 5
|
type = 5
|
||||||
icone = ExtResource("2_5uh04")
|
icone = ExtResource("2_5uh04")
|
||||||
bio = ""
|
bio = ""
|
||||||
|
price = 300
|
||||||
|
damage = 1
|
||||||
|
projectileScene = ExtResource("3_5uh04")
|
||||||
towerRange = SubResource("SphereShape3D_y05yr")
|
towerRange = SubResource("SphereShape3D_y05yr")
|
||||||
|
action_cooldown = 3.0
|
||||||
|
max_energy = 30.0
|
||||||
|
energy_regen = 5.0
|
||||||
|
energy_cost = 10.0
|
||||||
|
|
||||||
[node name="EnergyBar3D" parent="." index="6"]
|
[node name="EnergyBar3D" parent="." index="6"]
|
||||||
texture = SubResource("ViewportTexture_fegyx")
|
texture = SubResource("ViewportTexture_fegyx")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://b1pg1hgysx3am"]
|
[gd_scene load_steps=6 format=3 uid="uid://b1pg1hgysx3am"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_laam8"]
|
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_laam8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://boxdrq4nrq7hv" path="res://Assets/Icones/flamingo.svg" id="2_sciv6"]
|
[ext_resource type="Texture2D" uid="uid://boxdrq4nrq7hv" path="res://Assets/Icones/flamingo.svg" id="2_sciv6"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://baixm8pfsdo3t" path="res://Projectiles/Scenes/projectile-maxence.tscn" id="3_7fox5"]
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_pw4mj"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_pw4mj"]
|
||||||
radius = 10.0
|
radius = 10.0
|
||||||
|
|
@ -16,6 +17,7 @@ icone = ExtResource("2_sciv6")
|
||||||
bio = ""
|
bio = ""
|
||||||
price = 200
|
price = 200
|
||||||
damage = 10
|
damage = 10
|
||||||
|
projectileScene = ExtResource("3_7fox5")
|
||||||
towerRange = SubResource("SphereShape3D_pw4mj")
|
towerRange = SubResource("SphereShape3D_pw4mj")
|
||||||
action_cooldown = 3.0
|
action_cooldown = 3.0
|
||||||
max_energy = 50.0
|
max_energy = 50.0
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,13 @@
|
||||||
[gd_scene load_steps=12 format=3 uid="uid://db6aq2wdrcjtp"]
|
[gd_scene load_steps=7 format=3 uid="uid://db6aq2wdrcjtp"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_ki73m"]
|
[ext_resource type="PackedScene" uid="uid://trg7ag3dqr2l" path="res://Towers/tower.tscn" id="1_ki73m"]
|
||||||
[ext_resource type="Texture2D" uid="uid://m6jwakrus50v" path="res://Assets/Icones/sea-star.svg" id="2_n34tq"]
|
[ext_resource type="Texture2D" uid="uid://m6jwakrus50v" path="res://Assets/Icones/sea-star.svg" id="2_n34tq"]
|
||||||
[ext_resource type="Script" uid="uid://bg0x4egeu17qb" path="res://Upgrades/TowerUpgrade.gd" id="4_rbuca"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://df8u7dogl4wi0" path="res://Projectiles/Scenes/projectile-Victoria.tscn" id="4_sf52i"]
|
[ext_resource type="PackedScene" uid="uid://df8u7dogl4wi0" path="res://Projectiles/Scenes/projectile-Victoria.tscn" id="4_sf52i"]
|
||||||
[ext_resource type="Texture2D" uid="uid://315k07rsgf6t" path="res://Assets/Characters/Female1.png" id="5_2rqsg"]
|
[ext_resource type="Texture2D" uid="uid://315k07rsgf6t" path="res://Assets/Characters/Female1.png" id="5_2rqsg"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dqvou7t7o1t5d" path="res://Assets/Icones/medal2.png" id="5_c1yif"]
|
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_sf52i"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_sf52i"]
|
||||||
radius = 4.0
|
radius = 4.0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_4ogjq"]
|
|
||||||
script = ExtResource("4_rbuca")
|
|
||||||
baseCost = 20
|
|
||||||
value = 6.0
|
|
||||||
maxLevel = 1
|
|
||||||
costModificator = 30.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0wro2"]
|
|
||||||
script = ExtResource("4_rbuca")
|
|
||||||
type = 3
|
|
||||||
baseCost = 50
|
|
||||||
value = 3.0
|
|
||||||
maxLevel = 2
|
|
||||||
costModificator = 50.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_rk1vi"]
|
|
||||||
script = ExtResource("4_rbuca")
|
|
||||||
type = 2
|
|
||||||
baseCost = 200
|
|
||||||
value = 1.0
|
|
||||||
maxLevel = 1
|
|
||||||
upgradeDirection = -1
|
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_n34tq"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_n34tq"]
|
||||||
viewport_path = NodePath("EnergyBar3D/SubViewport")
|
viewport_path = NodePath("EnergyBar3D/SubViewport")
|
||||||
|
|
||||||
|
|
@ -41,16 +16,14 @@ tower_name = "Victoria"
|
||||||
type = 4
|
type = 4
|
||||||
icone = ExtResource("2_n34tq")
|
icone = ExtResource("2_n34tq")
|
||||||
bio = ""
|
bio = ""
|
||||||
price = 200
|
price = 666
|
||||||
damage = 5
|
damage = 5
|
||||||
projectileScene = ExtResource("4_sf52i")
|
projectileScene = ExtResource("4_sf52i")
|
||||||
towerRange = SubResource("SphereShape3D_sf52i")
|
towerRange = SubResource("SphereShape3D_sf52i")
|
||||||
action_cooldown = 1.5
|
action_cooldown = 1.5
|
||||||
max_energy = 15.0
|
max_energy = 50.0
|
||||||
energy_regen = 5.0
|
energy_regen = 50.0
|
||||||
energy_cost = 3.0
|
energy_cost = 50.0
|
||||||
buttonTooltip = "C'est Victoria"
|
|
||||||
upgrades = Array[ExtResource("4_rbuca")]([SubResource("Resource_4ogjq"), SubResource("Resource_0wro2"), SubResource("Resource_rk1vi")])
|
|
||||||
|
|
||||||
[node name="Sprite3D" parent="." index="5"]
|
[node name="Sprite3D" parent="." index="5"]
|
||||||
texture = ExtResource("5_2rqsg")
|
texture = ExtResource("5_2rqsg")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
extends HBoxContainer
|
extends HBoxContainer
|
||||||
|
|
||||||
|
|
||||||
const upgradeBtnScene : PackedScene = preload("res://UI/upgrade_button.tscn")
|
const UPGRADE_BTN : PackedScene = preload("uid://dfp5q5gek4ve7")
|
||||||
|
|
||||||
var tower : Tower
|
var tower : Tower
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ func createTowerUpgradeButtons(upgrades : Array) -> void:
|
||||||
%UpgradeContainer.visible = true
|
%UpgradeContainer.visible = true
|
||||||
%UpgradeContainer.get_children().map(func(btn): btn.queue_free())
|
%UpgradeContainer.get_children().map(func(btn): btn.queue_free())
|
||||||
for upgrade in upgrades:
|
for upgrade in upgrades:
|
||||||
var btn : UpgradeButton = upgradeBtnScene.instantiate()
|
var btn : UpgradeButton = UPGRADE_BTN.instantiate()
|
||||||
%UpgradeContainer.add_child(btn)
|
%UpgradeContainer.add_child(btn)
|
||||||
btn.setUpgrade(upgrade)
|
btn.setUpgrade(upgrade)
|
||||||
if tower:
|
if tower:
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
[ext_resource type="Theme" uid="uid://bbp4qcbwkeg7x" path="res://default_theme.tres" id="1_x7bkm"]
|
[ext_resource type="Theme" uid="uid://bbp4qcbwkeg7x" path="res://default_theme.tres" id="1_x7bkm"]
|
||||||
|
|
||||||
[node name="Panel" type="PanelContainer"]
|
[node name="Panel" type="PanelContainer"]
|
||||||
|
process_mode = 3
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ extends Control
|
||||||
|
|
||||||
const BUTTON_QTY = 4
|
const BUTTON_QTY = 4
|
||||||
|
|
||||||
const guiButton : PackedScene = preload("res://UI/gui_button.tscn")
|
const GUI_BUTTON : PackedScene = preload("uid://dqb5o8w7u50hc")
|
||||||
|
|
||||||
@onready var buttonContainer : GridContainer = %ButtonContainer
|
@onready var buttonContainer : GridContainer = %ButtonContainer
|
||||||
@onready var cubeIntegrity : ProgressBar = %CubeIntegrity
|
@onready var cubeIntegrity : ProgressBar = %CubeIntegrity
|
||||||
|
|
@ -77,7 +77,7 @@ func addTowerButtonNodes() -> void:
|
||||||
|
|
||||||
|
|
||||||
func createTowerButton(towerType : Tower.TYPE) -> void:
|
func createTowerButton(towerType : Tower.TYPE) -> void:
|
||||||
var btn : GuiButton = guiButton.instantiate()
|
var btn : GuiButton = GUI_BUTTON.instantiate()
|
||||||
btn.set_meta("dynamicButton", true)
|
btn.set_meta("dynamicButton", true)
|
||||||
|
|
||||||
if towerType:
|
if towerType:
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
extends Resource
|
@abstract
|
||||||
class_name Upgrade
|
class_name Upgrade extends Resource
|
||||||
|
|
||||||
|
|
||||||
enum SCALE_TYPE { LINEAR, EXP, LOG }
|
enum SCALE_TYPE { LINEAR, EXP, LOG }
|
||||||
enum UPGRADE_DIRECTION { INCREASE = 1, DECREASE = -1 }
|
enum UPGRADE_DIRECTION { INCREASE = 1, DECREASE = -1 }
|
||||||
|
|
||||||
|
|
||||||
@export var icon : Texture2D = preload("res://Assets/Icones/medal2.png")
|
@export var icon : Texture2D = preload("uid://dqvou7t7o1t5d")
|
||||||
@export var text : String
|
@export var text : String
|
||||||
@export var baseCost : int :
|
@export var baseCost : int :
|
||||||
set(value):
|
set(value):
|
||||||
|
|
@ -32,9 +32,8 @@ var level : int = 0
|
||||||
func isLevelMax() -> bool :
|
func isLevelMax() -> bool :
|
||||||
return not tierLock.is_empty() && level == tierLock[Game.tier]
|
return not tierLock.is_empty() && level == tierLock[Game.tier]
|
||||||
|
|
||||||
|
@abstract
|
||||||
func upgrade(_subject = null) -> bool:
|
func upgrade(_subject = null) -> bool
|
||||||
return false
|
|
||||||
|
|
||||||
|
|
||||||
func upgradeProperty(subject: Variant, property: String) -> void:
|
func upgradeProperty(subject: Variant, property: String) -> void:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
extends Path3D
|
extends Path3D
|
||||||
|
|
||||||
var particle_np := preload("res://VFX/paint_brush_particle.tscn")
|
var particle_np := preload("uid://drnc0eus8n2oy")
|
||||||
|
|
||||||
@export var duration : float = 6.0
|
@export var duration : float = 6.0
|
||||||
@export var spawn_timer : float = 0.1
|
@export var spawn_timer : float = 0.1
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ extends Node2D
|
||||||
|
|
||||||
var time := 0.0
|
var time := 0.0
|
||||||
|
|
||||||
var rain_drop_packed := preload("res://VFX/pixel_drop.tscn")
|
const RAIN_DROP : PackedScene = preload("uid://cqn4xrehqnuso")
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ func _physics_process(delta: float) -> void:
|
||||||
|
|
||||||
|
|
||||||
func make_it_rain() -> void:
|
func make_it_rain() -> void:
|
||||||
var rain_drop : RainDrop = rain_drop_packed.instantiate()
|
var rain_drop : RainDrop = RAIN_DROP.instantiate()
|
||||||
var screen_width = get_viewport().get_camera_2d().position.x + get_viewport().size.x/2
|
var screen_width = get_viewport().get_camera_2d().position.x + get_viewport().size.x/2
|
||||||
var screen_height = get_viewport().get_camera_2d().position.y - get_viewport().size.y/2 - 100 #Offset
|
var screen_height = get_viewport().get_camera_2d().position.y - get_viewport().size.y/2 - 100 #Offset
|
||||||
rain_drop.speed = speed
|
rain_drop.speed = speed
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ extends EditorPlugin
|
||||||
|
|
||||||
# Replace this value with a PascalCase autoload name, as per the GDScript style guide.
|
# Replace this value with a PascalCase autoload name, as per the GDScript style guide.
|
||||||
#const AUTOLOAD_NAME = "LevelEditorAutoload"
|
#const AUTOLOAD_NAME = "LevelEditorAutoload"
|
||||||
const ui = preload("res://addons/LevelEditor/wave_maker.tscn")
|
const ui = preload("uid://dh24t8804isms")
|
||||||
|
|
||||||
var main_panel_instance
|
var main_panel_instance
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class_name WaveMaker
|
||||||
signal spawnQtyChanged(newQty : int)
|
signal spawnQtyChanged(newQty : int)
|
||||||
|
|
||||||
|
|
||||||
const TROOP_SCENE = preload("res://addons/LevelEditor/UI/Troop/Troop.tscn")
|
const TROOP_SCENE = preload("uid://djrbvm8gmhly3")
|
||||||
|
|
||||||
|
|
||||||
var level : Level
|
var level : Level
|
||||||
|
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
[preset.0]
|
|
||||||
|
|
||||||
name="Windows Desktop"
|
|
||||||
platform="Windows Desktop"
|
|
||||||
runnable=true
|
|
||||||
advanced_options=false
|
|
||||||
dedicated_server=false
|
|
||||||
custom_features=""
|
|
||||||
export_filter="all_resources"
|
|
||||||
include_filter=""
|
|
||||||
exclude_filter=""
|
|
||||||
export_path="../_BUILD/PPDF_proto.zip"
|
|
||||||
patches=PackedStringArray()
|
|
||||||
encryption_include_filters=""
|
|
||||||
encryption_exclude_filters=""
|
|
||||||
seed=0
|
|
||||||
encrypt_pck=false
|
|
||||||
encrypt_directory=false
|
|
||||||
script_export_mode=2
|
|
||||||
|
|
||||||
[preset.0.options]
|
|
||||||
|
|
||||||
custom_template/debug=""
|
|
||||||
custom_template/release=""
|
|
||||||
debug/export_console_wrapper=1
|
|
||||||
binary_format/embed_pck=true
|
|
||||||
texture_format/s3tc_bptc=true
|
|
||||||
texture_format/etc2_astc=false
|
|
||||||
shader_baker/enabled=false
|
|
||||||
binary_format/architecture="x86_64"
|
|
||||||
codesign/enable=false
|
|
||||||
codesign/timestamp=true
|
|
||||||
codesign/timestamp_server_url=""
|
|
||||||
codesign/digest_algorithm=1
|
|
||||||
codesign/description=""
|
|
||||||
codesign/custom_options=PackedStringArray()
|
|
||||||
application/modify_resources=true
|
|
||||||
application/icon=""
|
|
||||||
application/console_wrapper_icon=""
|
|
||||||
application/icon_interpolation=4
|
|
||||||
application/file_version=""
|
|
||||||
application/product_version=""
|
|
||||||
application/company_name=""
|
|
||||||
application/product_name=""
|
|
||||||
application/file_description=""
|
|
||||||
application/copyright=""
|
|
||||||
application/trademarks=""
|
|
||||||
application/export_angle=0
|
|
||||||
application/export_d3d12=0
|
|
||||||
application/d3d12_agility_sdk_multiarch=true
|
|
||||||
ssh_remote_deploy/enabled=false
|
|
||||||
ssh_remote_deploy/host="user@host_ip"
|
|
||||||
ssh_remote_deploy/port="22"
|
|
||||||
ssh_remote_deploy/extra_args_ssh=""
|
|
||||||
ssh_remote_deploy/extra_args_scp=""
|
|
||||||
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
|
||||||
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
|
||||||
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
|
||||||
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
|
|
||||||
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
|
||||||
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
|
||||||
Start-ScheduledTask -TaskName godot_remote_debug
|
|
||||||
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
|
||||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
|
||||||
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
|
||||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
|
||||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
|
||||||
|
|
@ -90,8 +90,6 @@ build={
|
||||||
rest={
|
rest={
|
||||||
"deadzone": 0.2,
|
"deadzone": 0.2,
|
||||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(263, 18),"global_position":Vector2(272, 66),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(263, 18),"global_position":Vector2(272, 66),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194308,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
spawn_next_wave={
|
spawn_next_wave={
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue