Files
2024-08-23 15:49:34 +08:00

65 lines
1.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/********************************************************************************
* 文件名: BaseAI.cs
* 全路径: \Script\Player\BaseAI.cs
* 创建人: 李嘉
* 创建时间2013-11-18
*
* 功能说明: 客户端AI基础类提供接口
*
* 修改记录:
*********************************************************************************/
using UnityEngine;
using System.Collections;
using Games.GlobeDefine;
namespace Games.AI_Logic
{
public class BaseAI : MonoBehaviour
{
//AI的具体类型
protected CharacterDefine.AI_TYPE m_AIType;
public CharacterDefine.AI_TYPE AIType
{
get { return m_AIType; }
set { m_AIType = value; }
}
public CharacterDefine.AI_STATE_TYPE AIStateType;
public BaseAI()
{
m_AIType = CharacterDefine.AI_TYPE.AI_TYPE_INVALID;
}
//将AI装载到OBJ的AIController中
public void LoadAI()
{
AIController aiController = this.gameObject.GetComponent<AIController>();
if (aiController)
{
aiController.AddAIByStateType(this);
}
}
//销毁AI
public virtual void Destroy()
{
}
//激活AI
public virtual void OnActive()
{
}
//关闭AI
public virtual void OnDeactive()
{
}
//更新AI
public virtual void UpdateAI()
{
}
}
}