public Skill(AgentObject host, NEData neData) { Init(); m_cHost = host; m_cNEData = neData; m_cSkillData = m_cNEData.data as SkillData; m_cSkillTree = CreateNode(m_cNEData) as SkillTree; m_cSkillTree.Clear(); m_cBlackBoard = new SkillBlackBoard(this); m_bIsDo = false; m_sStartTime = -1000; }
public override BTActionResult OnRun(SkillBlackBoard blackBoard) { Skill skill = blackBoard.skill; AgentObject host = skill.host; TSVector bornPosition = host.curPosition; TSVector bornForward = host.curForward; if (!string.IsNullOrEmpty(m_cActionData.hangPoint)) { host.GetHangPoint(m_cActionData.hangPoint, out bornPosition, out bornForward); } TSVector targetForward = skill.targetForward; if (m_cActionData.useHangPoint) { targetForward = bornForward; } BattleScene.Instance.CreateRemote(m_cActionData.remoteId, skill.host.campId, bornPosition, targetForward, skill.targetAgentId, skill.targetAgentType, skill.targetPosition, targetForward); return(BTActionResult.Ready); }
public virtual void OnExit(SkillBlackBoard blackBoard) { }
public virtual BTActionResult OnRun(SkillBlackBoard blackBoard) { return(BTActionResult.Running); }
protected virtual void OnEnter(SkillBlackBoard blackBoard) { }