1、搜索敌人方法
在GameManager中创建所有敌人的列表List<Character> playerCharacters和List<Enemy> enemyCharacters的列表
GameManager中创建Character时,同时将角色添加到列表:
playerCharacters.Add(go.GetComponent<Character>());
遍历角色,看是否在攻击范围之内
Vector3.Distance()
1、搜索敌人方法
在GameManager中创建所有敌人的列表List<Character> playerCharacters和List<Enemy> enemyCharacters的列表
GameManager中创建Character时,同时将角色添加到列表:
playerCharacters.Add(go.GetComponent<Character>());
遍历角色,看是否在攻击范围之内
Vector3.Distance()