Ejemplo n.º 1
0
        void ContinueLoiter(DDDServerConnection serverConnection, DMView dmView)
        {
            SimObject     me            = dmView.AllObjects[m_thisID];
            LocationValue myLocation    = me.Location;
            SimObject     track         = dmView.AllObjects[m_targetID];
            LocationValue trackLocation = track.Location;

            if (BehaviorHelper.LocationIsEqual(myLocation, m_destWaypoint.Location))
            {
                m_destWaypoint = m_absoluteLoiterPattern.GetNextWaypoint();
                m_relativeLoiterPattern.NextWaypointIndex    = m_absoluteLoiterPattern.NextWaypointIndex;
                m_relativeLoiterPattern.CurrentWaypointIndex = m_absoluteLoiterPattern.CurrentWaypointIndex;
                serverConnection.SendMoveObjectRequest(m_thisID, m_destWaypoint.Location, 1);
            }
        }
Ejemplo n.º 2
0
        public void Update(DDDServerConnection serverConnection, DMView dmView)
        {
            if (m_done)
            {
                return;
            }
            SimObject     me         = dmView.AllObjects[m_thisID];
            LocationValue myLocation = me.Location;


            if (BehaviorHelper.LocationIsEqual(myLocation, m_destWaypoint.Location))
            {
                m_destWaypoint = m_absoluteLoiterPattern.GetNextWaypoint();
                serverConnection.SendMoveObjectRequest(m_thisID, m_destWaypoint.Location, 1);
            }
        }