feat: 添加敌人并且追踪player,同时避免敌人重叠
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://delxlqjos3br"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://emsi6ifyt0vf" path="res://assets/sprites/Enemies/Enemy_5.png" id="1_ab1gs"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="2_mh3yp"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_mh3yp")
|
||||
name = "Charger"
|
||||
type = 1
|
||||
icon = ExtResource("1_ab1gs")
|
||||
health = 8
|
||||
health_increase_per_wave = 3.0
|
||||
damage = 2.5
|
||||
damage_increase_per_wave = 2.0
|
||||
speed = 280
|
||||
luck = 0.0
|
||||
block_chance = 6.0
|
||||
gold_drop = 3
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://cv3187t7wsfxh"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c6vplmpl4q4jr" path="res://assets/sprites/Enemies/Enemy_3.png" id="1_ymlpp"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="2_86dbv"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_86dbv")
|
||||
name = "Chaser Fast"
|
||||
type = 1
|
||||
icon = ExtResource("1_ymlpp")
|
||||
health = 6
|
||||
health_increase_per_wave = 2.5
|
||||
damage = 1.5
|
||||
damage_increase_per_wave = 1.5
|
||||
speed = 350
|
||||
luck = 0.0
|
||||
block_chance = 5.0
|
||||
gold_drop = 2
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://db0igkyfvumk7"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bf4ls8ho3cuqa" path="res://assets/sprites/Enemies/Enemy_2.png" id="1_gkg84"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="2_o5vp8"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_o5vp8")
|
||||
name = "Chaser Mid"
|
||||
type = 1
|
||||
icon = ExtResource("1_gkg84")
|
||||
health = 8
|
||||
health_increase_per_wave = 2.0
|
||||
damage = 2.0
|
||||
luck = 0.0
|
||||
block_chance = 7.0
|
||||
gold_drop = 2
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://bn4dskgwnahaq"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d1ou504pylric" path="res://assets/sprites/Enemies/Enemy_1.png" id="1_cneyk"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="1_m42qi"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_m42qi")
|
||||
name = "Chaser Slow"
|
||||
type = 1
|
||||
icon = ExtResource("1_cneyk")
|
||||
health = 6
|
||||
damage = 1.5
|
||||
speed = 250
|
||||
luck = 0.0
|
||||
block_chance = 3.0
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://bnknrm368mpwb"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://4mllmwdfhmce" path="res://assets/sprites/Enemies/Enemy_4.png" id="1_llpja"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="2_1vxf5"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_1vxf5")
|
||||
name = "Shooter"
|
||||
type = 1
|
||||
icon = ExtResource("1_llpja")
|
||||
health = 4
|
||||
health_increase_per_wave = 2.0
|
||||
damage = 3.0
|
||||
damage_increase_per_wave = 1.5
|
||||
speed = 260
|
||||
luck = 0.0
|
||||
block_chance = 3.0
|
||||
gold_drop = 3
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://dhbwq0p1appau"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dpxw8tsbgrfse" path="res://assets/sprites/Players/Player_2.png" id="1_artcn"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="1_fokdh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_fokdh")
|
||||
name = "Brawler"
|
||||
icon = ExtResource("1_artcn")
|
||||
health = 25
|
||||
health_increase_per_wave = 0.0
|
||||
damage = 4
|
||||
damage_increase_per_wave = 0.0
|
||||
speed = 270
|
||||
luck = 3.0
|
||||
block_chance = 5.0
|
||||
gold_drop = 0
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://ceyne237du1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="1_02km3"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmox6e28kf6ax" path="res://assets/sprites/Players/Player_4.png" id="1_ul0bi"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_02km3")
|
||||
name = "Bunny"
|
||||
icon = ExtResource("1_ul0bi")
|
||||
health = 20
|
||||
health_increase_per_wave = 0.0
|
||||
damage = 5
|
||||
damage_increase_per_wave = 0.0
|
||||
speed = 325
|
||||
luck = 5.0
|
||||
block_chance = 3.0
|
||||
gold_drop = 0
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://cuj1u77pg06ah"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dq63ocnu3lset" path="res://assets/sprites/Players/Player_3}.png" id="1_6fhtk"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="2_olwl6"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_olwl6")
|
||||
name = "Crazy"
|
||||
icon = ExtResource("1_6fhtk")
|
||||
health = 15
|
||||
health_increase_per_wave = 0.0
|
||||
damage = 3
|
||||
damage_increase_per_wave = 0.0
|
||||
speed = 350
|
||||
luck = 5.0
|
||||
block_chance = 5.0
|
||||
gold_drop = 0
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://crhkwist448wy"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bt0lww88864ws" path="res://assets/sprites/Players/Player_5.png" id="1_ujefh"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="2_xvmk0"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_xvmk0")
|
||||
name = "Knight"
|
||||
icon = ExtResource("1_ujefh")
|
||||
health = 30
|
||||
health_increase_per_wave = 0.0
|
||||
damage = 6
|
||||
damage_increase_per_wave = 0.0
|
||||
speed = 260
|
||||
block_chance = 10.0
|
||||
gold_drop = 0
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="UnitStats" format=3 uid="uid://btnfef0ui2ju8"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cproxhccob85g" path="res://assets/sprites/Players/Player_1.png" id="1_6skj5"]
|
||||
[ext_resource type="Script" uid="uid://dgjdpmaiufhs6" path="res://resources/units/unit_stats.gd" id="1_g5q6j"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_g5q6j")
|
||||
name = "Well Rounded"
|
||||
icon = ExtResource("1_6skj5")
|
||||
health = 15
|
||||
health_increase_per_wave = 0.0
|
||||
damage = 3
|
||||
damage_increase_per_wave = 0.0
|
||||
luck = 5.0
|
||||
block_chance = 1.0
|
||||
gold_drop = 0
|
||||
metadata/_custom_type_script = "uid://dgjdpmaiufhs6"
|
||||
@@ -0,0 +1,19 @@
|
||||
extends Resource
|
||||
class_name UnitStats
|
||||
|
||||
enum UnitType {
|
||||
PLAYER,
|
||||
ENEMY
|
||||
}
|
||||
|
||||
@export var name: String
|
||||
@export var type: UnitType
|
||||
@export var icon: Texture2D
|
||||
@export var health := 1
|
||||
@export var health_increase_per_wave := 1.0
|
||||
@export var damage := 1.0
|
||||
@export var damage_increase_per_wave := 1.0
|
||||
@export var speed := 300
|
||||
@export var luck := 1.0
|
||||
@export var block_chance := 0.0
|
||||
@export var gold_drop := 1
|
||||
@@ -0,0 +1 @@
|
||||
uid://dgjdpmaiufhs6
|
||||
Reference in New Issue
Block a user