コード例 #1
0
        public void SetPathfindingDebugTarget(Vector3D?target)
        {
            MyExternalPathfinding pathfinding = this.m_pathfinding as MyExternalPathfinding;

            if (pathfinding != null)
            {
                pathfinding.SetTarget(target);
            }
            else if (target != null)
            {
                this.m_debugTargetAABB = new MyOrientedBoundingBoxD(target.Value, new Vector3D(5.0, 5.0, 5.0), Quaternion.Identity).GetAABB();
                List <MyEntity> result = new List <MyEntity>();
                MyGamePruningStructure.GetAllEntitiesInBox(ref this.m_debugTargetAABB, result, MyEntityQueryType.Both);
            }
            this.DebugTarget = target;
        }
コード例 #2
0
        public void SetPathfindingDebugTarget(Vector3D? target)
        {
            MyExternalPathfinding pf = m_pathfinding as MyExternalPathfinding;
            if (pf != null)
                pf.SetTarget(target);
            else
            {
                if (target.HasValue)
                {
                    //TODO: Just for debug purpose... Anything can be implemented

                    m_debugTargetAABB = new MyOrientedBoundingBoxD(target.Value, new Vector3D(5, 5, 5), Quaternion.Identity).GetAABB();
                    List<VRage.Game.Entity.MyEntity> entities = new List<VRage.Game.Entity.MyEntity>();
                    MyGamePruningStructure.GetAllEntitiesInBox(ref m_debugTargetAABB, entities);
                }
            }

            DebugTarget = target;
        }