Exemplo n.º 1
0
        public float[] getWaypointPosition(String name)
        {
            zCListSort <zCWaypoint> wpL = WpList;

            do
            {
                zCWaypoint wp = wpL.Data;
                if (wp.Name.Value.Trim().ToLower() == name.Trim().ToLower())
                {
                    return new float[] { wp.Position.X, wp.Position.Y, wp.Position.Z, wp.Direction.X, wp.Direction.Y, wp.Direction.Z }
                }
                ;
            } while ((wpL = wpL.Next).Address != 0);


            List <zCVob> vobs = oCGame.Game(Process).World.getVobList(zCVob.VobTypes.Freepoint);

            foreach (zCVob vob in vobs)
            {
                if (vob.ObjectName.Value.Trim().ToLower() == name.ToLower().Trim())
                {
                    return(new float[] { vob.TrafoObjToWorld.get(3), vob.TrafoObjToWorld.get(7), vob.TrafoObjToWorld.get(11) });
                }
            }

            return(null);
        }
Exemplo n.º 2
0
        public zCWaypoint GetWaypointByName(String name)
        {
            zCListSort <zCWaypoint> wpL = WpList;

            do
            {
                zCWaypoint wp = wpL.Data;
                if (wp.Name.Value.Trim().ToLower() == name.Trim().ToLower())
                {
                    return(wp);
                }
            } while ((wpL = wpL.Next).Address != 0);

            return(null);
        }