コード例 #1
0
        protected override AIOneRunStatus InternalRun()
        {
            var random = new System.Random(213); //todo

            var foragingKnowledgeBox = OwningBot.GetKnowledgeBox <ForagingKnowledgeBox>();
            var foragingArea         = foragingKnowledgeBox.ForagingArea;

            foragingKnowledgeBox.SearchStartPoint = foragingArea.RandomPointInRectalngle(random);

            return(AIOneRunStatus.Succeded);
        }
コード例 #2
0
ファイル: AITask.cs プロジェクト: defacto2k15/PwMgr
        protected override void InternalStart()
        {
            _navigationComponent = OwningBot.GetComponent <MyStaticTargetNavigationComponentOC>();

            var box = OwningBot.GetKnowledgeBox <NavigationKnowledgeBox>(this);

            _navigationComponent.Initialize(new NavigationOrder()
            {
                SucceessDistance = box.SuccessDistance,
                Target           = box.PositionTarget
            });
        }