summaryrefslogtreecommitdiff
path: root/Towers/Components
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-09 17:20:55 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-09 17:20:55 +0200
commit1aac583cee47d232ef22d8c5df97b888f689ab96 (patch)
tree7ef0796e4f01272fc68d199e1b0dc1812aaad1e0 /Towers/Components
parentb96e384d8299473b14edcbf885fa914a9308d18f (diff)
intermediate commit
Diffstat (limited to 'Towers/Components')
-rw-r--r--Towers/Components/Assets/attack-component.pngbin0 -> 191 bytes
-rw-r--r--Towers/Components/Assets/attack-component.png.import34
-rw-r--r--Towers/Components/Assets/attack-component.png~bin0 -> 206 bytes
-rw-r--r--Towers/Components/Assets/burn-component.pngbin0 -> 175 bytes
-rw-r--r--Towers/Components/Assets/burn-component.png.import34
-rw-r--r--Towers/Components/Assets/burn-component.png~bin0 -> 175 bytes
-rw-r--r--Towers/Components/Assets/frost-component.pngbin0 -> 176 bytes
-rw-r--r--Towers/Components/Assets/frost-component.png.import34
-rw-r--r--Towers/Components/Assets/range-component.pngbin0 -> 162 bytes
-rw-r--r--Towers/Components/Assets/range-component.png.import34
-rw-r--r--Towers/Components/Assets/range-component.png~bin0 -> 176 bytes
-rw-r--r--Towers/Components/BurnComponent.gd11
-rw-r--r--Towers/Components/FrostComponent.gd11
-rw-r--r--Towers/Components/TowerComponent.gd15
14 files changed, 173 insertions, 0 deletions
diff --git a/Towers/Components/Assets/attack-component.png b/Towers/Components/Assets/attack-component.png
new file mode 100644
index 0000000..bb9250c
--- /dev/null
+++ b/Towers/Components/Assets/attack-component.png
Binary files differ
diff --git a/Towers/Components/Assets/attack-component.png.import b/Towers/Components/Assets/attack-component.png.import
new file mode 100644
index 0000000..4000c58
--- /dev/null
+++ b/Towers/Components/Assets/attack-component.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://gbknvb38euuq"
+path="res://.godot/imported/attack-component.png-64ebd1f55ef8067c9f5d485d7df578be.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Towers/Components/Assets/attack-component.png"
+dest_files=["res://.godot/imported/attack-component.png-64ebd1f55ef8067c9f5d485d7df578be.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
diff --git a/Towers/Components/Assets/attack-component.png~ b/Towers/Components/Assets/attack-component.png~
new file mode 100644
index 0000000..e2f80bc
--- /dev/null
+++ b/Towers/Components/Assets/attack-component.png~
Binary files differ
diff --git a/Towers/Components/Assets/burn-component.png b/Towers/Components/Assets/burn-component.png
new file mode 100644
index 0000000..33f9f7e
--- /dev/null
+++ b/Towers/Components/Assets/burn-component.png
Binary files differ
diff --git a/Towers/Components/Assets/burn-component.png.import b/Towers/Components/Assets/burn-component.png.import
new file mode 100644
index 0000000..433699a
--- /dev/null
+++ b/Towers/Components/Assets/burn-component.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://2djpswd6sgng"
+path="res://.godot/imported/burn-component.png-de3b76cc035d6d043dda7fb037e0c7e4.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Towers/Components/Assets/burn-component.png"
+dest_files=["res://.godot/imported/burn-component.png-de3b76cc035d6d043dda7fb037e0c7e4.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
diff --git a/Towers/Components/Assets/burn-component.png~ b/Towers/Components/Assets/burn-component.png~
new file mode 100644
index 0000000..c9c1619
--- /dev/null
+++ b/Towers/Components/Assets/burn-component.png~
Binary files differ
diff --git a/Towers/Components/Assets/frost-component.png b/Towers/Components/Assets/frost-component.png
new file mode 100644
index 0000000..e1c12f7
--- /dev/null
+++ b/Towers/Components/Assets/frost-component.png
Binary files differ
diff --git a/Towers/Components/Assets/frost-component.png.import b/Towers/Components/Assets/frost-component.png.import
new file mode 100644
index 0000000..9ebc0d6
--- /dev/null
+++ b/Towers/Components/Assets/frost-component.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ba3dmlce1wv2p"
+path="res://.godot/imported/frost-component.png-09974dabb6d634a6ff1c953d1b9c629b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Towers/Components/Assets/frost-component.png"
+dest_files=["res://.godot/imported/frost-component.png-09974dabb6d634a6ff1c953d1b9c629b.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
diff --git a/Towers/Components/Assets/range-component.png b/Towers/Components/Assets/range-component.png
new file mode 100644
index 0000000..e5ef51e
--- /dev/null
+++ b/Towers/Components/Assets/range-component.png
Binary files differ
diff --git a/Towers/Components/Assets/range-component.png.import b/Towers/Components/Assets/range-component.png.import
new file mode 100644
index 0000000..9500e69
--- /dev/null
+++ b/Towers/Components/Assets/range-component.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dx07y4scyi5a1"
+path="res://.godot/imported/range-component.png-e61b3503df71027fb6ac2a7fbd9e5943.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Towers/Components/Assets/range-component.png"
+dest_files=["res://.godot/imported/range-component.png-e61b3503df71027fb6ac2a7fbd9e5943.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
diff --git a/Towers/Components/Assets/range-component.png~ b/Towers/Components/Assets/range-component.png~
new file mode 100644
index 0000000..e1c12f7
--- /dev/null
+++ b/Towers/Components/Assets/range-component.png~
Binary files differ
diff --git a/Towers/Components/BurnComponent.gd b/Towers/Components/BurnComponent.gd
new file mode 100644
index 0000000..11e9e3f
--- /dev/null
+++ b/Towers/Components/BurnComponent.gd
@@ -0,0 +1,11 @@
+extends TowerComponent
+
+
+func _init() -> void:
+ name = "Burn"
+ set_sprite(preload("res://Towers/Components/Assets/burn-component.png"))
+
+
+func on_shoot(target: Unit):
+ var effect = preload("res://Effects/BurnEffect.tscn").instantiate()
+ target.add_effect(effect)
diff --git a/Towers/Components/FrostComponent.gd b/Towers/Components/FrostComponent.gd
new file mode 100644
index 0000000..d6384a7
--- /dev/null
+++ b/Towers/Components/FrostComponent.gd
@@ -0,0 +1,11 @@
+extends TowerComponent
+
+
+func _init() -> void:
+ name = "Frost"
+ set_sprite(preload("res://Towers/Components/Assets/frost-component.png"))
+
+
+func on_shoot(target: Unit):
+ var effect = preload("res://Effects/SlowEffect.tscn").instantiate()
+ target.add_effect(effect)
diff --git a/Towers/Components/TowerComponent.gd b/Towers/Components/TowerComponent.gd
new file mode 100644
index 0000000..570b442
--- /dev/null
+++ b/Towers/Components/TowerComponent.gd
@@ -0,0 +1,15 @@
+class_name TowerComponent
+extends Resource
+
+
+var name: String
+var sprite: Sprite2D = Sprite2D.new()
+
+
+func set_sprite(texture: Texture2D):
+ sprite.texture = texture
+
+ sprite.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
+ sprite.centered = false
+ sprite.scale = Vector2(2, 2)
+ sprite.name = name