コード例 #1
0
ファイル: Skill.cs プロジェクト: DongerGroup/FrameSync-1
 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;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public virtual void OnExit(SkillBlackBoard blackBoard)
 {
 }
コード例 #4
0
 public virtual BTActionResult OnRun(SkillBlackBoard blackBoard)
 {
     return(BTActionResult.Running);
 }
コード例 #5
0
 protected virtual void OnEnter(SkillBlackBoard blackBoard)
 {
 }