From 1aac583cee47d232ef22d8c5df97b888f689ab96 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 9 Oct 2024 17:20:55 +0200 Subject: intermediate commit --- Towers/Components/Assets/attack-component.png | Bin 0 -> 191 bytes .../Components/Assets/attack-component.png.import | 34 +++++++++++++++++++++ Towers/Components/Assets/attack-component.png~ | Bin 0 -> 206 bytes Towers/Components/Assets/burn-component.png | Bin 0 -> 175 bytes Towers/Components/Assets/burn-component.png.import | 34 +++++++++++++++++++++ Towers/Components/Assets/burn-component.png~ | Bin 0 -> 175 bytes Towers/Components/Assets/frost-component.png | Bin 0 -> 176 bytes .../Components/Assets/frost-component.png.import | 34 +++++++++++++++++++++ Towers/Components/Assets/range-component.png | Bin 0 -> 162 bytes .../Components/Assets/range-component.png.import | 34 +++++++++++++++++++++ Towers/Components/Assets/range-component.png~ | Bin 0 -> 176 bytes Towers/Components/BurnComponent.gd | 11 +++++++ Towers/Components/FrostComponent.gd | 11 +++++++ Towers/Components/TowerComponent.gd | 15 +++++++++ 14 files changed, 173 insertions(+) create mode 100644 Towers/Components/Assets/attack-component.png create mode 100644 Towers/Components/Assets/attack-component.png.import create mode 100644 Towers/Components/Assets/attack-component.png~ create mode 100644 Towers/Components/Assets/burn-component.png create mode 100644 Towers/Components/Assets/burn-component.png.import create mode 100644 Towers/Components/Assets/burn-component.png~ create mode 100644 Towers/Components/Assets/frost-component.png create mode 100644 Towers/Components/Assets/frost-component.png.import create mode 100644 Towers/Components/Assets/range-component.png create mode 100644 Towers/Components/Assets/range-component.png.import create mode 100644 Towers/Components/Assets/range-component.png~ create mode 100644 Towers/Components/BurnComponent.gd create mode 100644 Towers/Components/FrostComponent.gd create mode 100644 Towers/Components/TowerComponent.gd (limited to 'Towers/Components') diff --git a/Towers/Components/Assets/attack-component.png b/Towers/Components/Assets/attack-component.png new file mode 100644 index 0000000..bb9250c Binary files /dev/null and b/Towers/Components/Assets/attack-component.png 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 Binary files /dev/null and b/Towers/Components/Assets/attack-component.png~ differ diff --git a/Towers/Components/Assets/burn-component.png b/Towers/Components/Assets/burn-component.png new file mode 100644 index 0000000..33f9f7e Binary files /dev/null and b/Towers/Components/Assets/burn-component.png 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 Binary files /dev/null and b/Towers/Components/Assets/burn-component.png~ differ diff --git a/Towers/Components/Assets/frost-component.png b/Towers/Components/Assets/frost-component.png new file mode 100644 index 0000000..e1c12f7 Binary files /dev/null and b/Towers/Components/Assets/frost-component.png 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 Binary files /dev/null and b/Towers/Components/Assets/range-component.png 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 Binary files /dev/null and b/Towers/Components/Assets/range-component.png~ 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 -- cgit v1.2.3