Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
        public List <oCItem> getItemList()
        {
            List <oCItem> items = new List <oCItem>();


            zCListSort <oCItem> itemList = this.ItemList;

            do
            {
                oCItem item = itemList.Data;

                if (item == null || item.Address == 0)
                {
                    continue;
                }
                items.Add(item);
            } while ((itemList = itemList.Next).Address != 0);

            return(items);
        }
Ejemplo n.º 4
0
        public List <zCVob> getItemList(zCVob.gVobTypes vobType)
        {
            List <zCVob> vobs = new List <zCVob>();

            zCListSort <zCVob> vobList = this.VobList;

            do
            {
                zCVob vob = vobList.Data;

                //Check if vob is item
                if (vob == null || vob.Address == 0 || vob.VTBL != vobType)
                {
                    continue;
                }

                //add the vob to the itemlist
                vobs.Add(vob);
            } while ((vobList = vobList.Next).Address != 0);

            return(vobs);
        }