34 lines
602 B
C#
34 lines
602 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Game
|
|
{
|
|
public class AttackComponent
|
|
{
|
|
private Hero character;
|
|
|
|
public AttackComponent(Hero character)
|
|
{
|
|
this.character = character;
|
|
}
|
|
|
|
public void Update(float deltaTime)
|
|
{
|
|
// 判断攻击范围内是否有敌人
|
|
|
|
// 无敌人,进行寻路
|
|
|
|
// 有敌人,执行攻击逻辑
|
|
}
|
|
|
|
// 寻路
|
|
void PathFinding(float deltaTime)
|
|
{
|
|
}
|
|
|
|
// 攻击
|
|
void Attack(float deltaTime)
|
|
{
|
|
}
|
|
}
|
|
} |