• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LSL_Types.LSLInteger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger的典型用法代码示例。如果您正苦于以下问题:C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger类的具体用法?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger怎么用?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger类属于命名空间,在下文中一共展示了Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: botSetMap

        public void botSetMap(string keyOfBot, LSL_List positions, LSL_List movementType, LSL_Integer flags)
        {
            ScriptProtection.CheckThreatLevel (ThreatLevel.Moderate, "botSetMap", m_host, "bot");
            List<Vector3> PositionsMap = new List<Vector3>();
            for(int i = 0; i < positions.Length; i++)
            {
                LSL_Vector pos = positions.GetVector3Item(i);
                PositionsMap.Add(new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
            }
            List<TravelMode> TravelMap = new List<TravelMode>();
            for(int i = 0; i < movementType.Length; i++)
            {
                LSL_Integer travel = movementType.GetLSLIntegerItem(i);
                TravelMap.Add((TravelMode)travel.value);
            }

            IBotManager manager = World.RequestModuleInterface<IBotManager>();
            if (manager != null)
                manager.SetBotMap(UUID.Parse(keyOfBot), PositionsMap, TravelMap, flags.value);
        }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:20,代码来源:Bot_API.cs


示例2: osRezObject

 public DateTime osRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param, LSL_Integer isRezAtRoot, LSL_Integer doRecoil, LSL_Integer SetDieAtEdge, LSL_Integer CheckPos)
 {
     return m_LSL_Api.llRezPrim(inventory, pos, vel, rot, param, isRezAtRoot == 1, doRecoil == 1, SetDieAtEdge == 1, CheckPos == 1);
 }
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:4,代码来源:OSSL_Api.cs


示例3: llClearPrimMedia

        public LSL_Integer llClearPrimMedia(LSL_Integer face)
        {
            ScriptSleep(1000);

            // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
            // Assuming silently fail means sending back LSL_STATUS_OK.  Ideally, need to check this.
            // FIXME: Don't perform the media check directly
            if (face < 0 || face > m_host.GetNumberOfSides() - 1)
                {
                return (LSL_Integer)ScriptBaseClass.LSL_STATUS_OK;
                }

            IMoapModule module = World.RequestModuleInterface<IMoapModule>();
            if (null == module)
                throw new Exception("Media on a prim functions not available");

            module.ClearMediaEntry(m_host, face);

            return (LSL_Integer)ScriptBaseClass.LSL_STATUS_OK;
        }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:20,代码来源:LSL_Api.cs


示例4: llGetPrimMediaParams

 public LSL_List llGetPrimMediaParams(LSL_Integer face, LSL_List commandList)
 {
     return m_LSL_Functions.llGetPrimMediaParams(face, commandList);
 }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:4,代码来源:LSL_Stub.cs


示例5: llScriptProfiler

 public void llScriptProfiler (LSL_Integer profilerFlags)
 {
     //TODO: We don't support this, not implemented
 }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:4,代码来源:LSL_Api.cs


示例6: llSetMemoryLimit

        public LSL_Integer llSetMemoryLimit (LSL_Integer limit)
        {
            if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
                return new LSL_Integer();

            // Make scripts designed for LSO happy
            return 16384;
        }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:8,代码来源:LSL_Api.cs


示例7: llSetLinkCamera

        public void llSetLinkCamera (LSL_Integer link, LSL_Vector eye, LSL_Vector at)
        {
            if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;

            List<ISceneChildEntity> entities = GetLinkParts(link);
            if(entities.Count > 0)
            {
                entities[0].CameraEyeOffset = new Vector3((float)eye.x, (float)eye.y, (float)eye.z);
                entities[0].CameraAtOffset = new Vector3((float)at.x, (float)at.y, (float)at.z);
            }
        }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:11,代码来源:LSL_Api.cs


示例8: llLinkLookAt

        public void llLinkLookAt(LSL_Integer link, LSL_Vector target, double strength, double damping)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;

            List<ISceneChildEntity> parts = GetLinkParts(link);

            foreach (ISceneChildEntity part in parts)
                LookAt(target, strength, damping, part);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:9,代码来源:LSL_Api.cs


示例9: llLinkRotLookAt

        public void llLinkRotLookAt(LSL_Integer link, LSL_Rotation target, double strength, double damping)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;

            Quaternion rot = new Quaternion((float) target.x, (float) target.y, (float) target.z, (float) target.s);
            List<ISceneChildEntity> parts = GetLinkParts(link);

            foreach (ISceneChildEntity part in parts)
                part.RotLookAt(rot, (float) strength, (float) damping);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:10,代码来源:LSL_Api.cs


示例10: llTransferLindenDollars

        public LSL_String llTransferLindenDollars(LSL_String destination, LSL_Integer amt)
        {
            LSL_String transferID = UUID.Random().ToString();
            IMoneyModule moneyMod = World.RequestModuleInterface<IMoneyModule>();
            LSL_String data = "";
            LSL_Integer success = LSL_Integer.FALSE;
            TaskInventoryItem item = m_host.TaskInventory[m_itemID];
            UUID destID;
            if (item.PermsGranter == UUID.Zero || (item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
                data = llList2CSV(new LSL_Types.list("MISSING_PERMISSION_DEBIT"));
            else if (!UUID.TryParse(destination, out destID))
                data = llList2CSV(new LSL_Types.list("INVALID_AGENT"));
            else if (amt <= 0)
                data = llList2CSV(new LSL_Types.list("INVALID_AMOUNT"));
            else if (World.UserAccountService.GetUserAccount(World.RegionInfo.AllScopeIDs, destID) == null)
                data = llList2CSV(new LSL_Types.list("LINDENDOLLAR_ENTITYDOESNOTEXIST"));
            else if (m_host.ParentEntity.OwnerID == m_host.ParentEntity.GroupID)
                data = llList2CSV(new LSL_Types.list("GROUP_OWNED"));
            else if (moneyMod != null)
            {
                success = moneyMod.Transfer(UUID.Parse(destination), m_host.OwnerID, amt, "");
                data =
                    llList2CSV(success
                                   ? new LSL_List(destination, amt)
                                   : new LSL_Types.list("LINDENDOLLAR_INSUFFICIENTFUNDS"));
            }
            else
                data = llList2CSV(new LSL_Types.list("SERVICE_ERROR"));

            m_ScriptEngine.PostScriptEvent(m_itemID, m_host.UUID, new EventParams(
                                                                      "transaction_result", new Object[]
                                                                                                {
                                                                                                    transferID, success,
                                                                                                    data
                                                                                                },
                                                                      new DetectParams[0]), EventPriority.FirstStart);

            return transferID;
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:39,代码来源:LSL_Api.cs


示例11: llExecCharacterCmd

 public void llExecCharacterCmd(LSL_Integer command, LSL_List options)
 {
     IBotManager botManager = World.RequestModuleInterface<IBotManager>();
     if (botManager != null)
     {
         IBotController controller = botManager.GetCharacterManager(m_host.ParentEntity.UUID);
         if (command == ScriptBaseClass.CHARACTER_CMD_JUMP)
             controller.Jump();
         if (command == ScriptBaseClass.CHARACTER_CMD_STOP)
             controller.StopMoving(false, true);
     }
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:12,代码来源:LSL_Api.cs


示例12: llManageEstateAccess

 public LSL_Integer llManageEstateAccess(LSL_Integer action, LSL_String avatar)
 {
     if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
         return LSL_Integer.FALSE;
     if (World.Permissions.IsAdministrator(m_host.OwnerID))
     {
         if (action == ScriptBaseClass.ESTATE_ACCESS_ALLOWED_AGENT_ADD)
             World.RegionInfo.EstateSettings.AddEstateUser(UUID.Parse(avatar));
         else if (action == ScriptBaseClass.ESTATE_ACCESS_ALLOWED_AGENT_REMOVE)
             World.RegionInfo.EstateSettings.RemoveEstateUser(UUID.Parse(avatar));
         else if (action == ScriptBaseClass.ESTATE_ACCESS_ALLOWED_GROUP_ADD)
             World.RegionInfo.EstateSettings.AddEstateGroup(UUID.Parse(avatar));
         else if (action == ScriptBaseClass.ESTATE_ACCESS_ALLOWED_GROUP_REMOVE)
             World.RegionInfo.EstateSettings.RemoveEstateGroup(UUID.Parse(avatar));
         else if (action == ScriptBaseClass.ESTATE_ACCESS_BANNED_AGENT_ADD)
             World.RegionInfo.EstateSettings.AddBan(new EstateBan
                                                        {
                                                            EstateID = World.RegionInfo.EstateSettings.EstateID,
                                                            BannedUserID = UUID.Parse(avatar)
                                                        });
         else if (action == ScriptBaseClass.ESTATE_ACCESS_BANNED_AGENT_REMOVE)
             World.RegionInfo.EstateSettings.RemoveBan(UUID.Parse(avatar));
         return LSL_Integer.TRUE;
     }
     return LSL_Integer.FALSE;
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:26,代码来源:LSL_Api.cs


示例13: llGetLinkMedia

        public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
                return new LSL_List();

            List<ISceneChildEntity> entities = GetLinkParts(link);
            if (entities.Count == 0 || face < 0 || face > entities[0].GetNumberOfSides() - 1)
                return new LSL_List();
            LSL_List res = new LSL_List();

            return entities.Select(part => GetPrimMediaParams(part, face, rules)).Aggregate(res,
                                                                                            (current, partRes) =>
                                                                                            current + partRes);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:14,代码来源:LSL_Api.cs


示例14: osSetLinkPrimitiveParams

        public void osSetLinkPrimitiveParams(LSL_Integer link, LSL_List rules)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "osSetLinkPrimitiveParams", m_host, "OSSL", m_itemID))
                return;

            InitLSL();
            List<IEntity> parts = m_LSL_Api.GetLinkPartsAndEntities(link);

            foreach (IEntity part in parts)
                m_LSL_Api.SetPrimParams(part, rules, true);
        }
开发者ID:samiam123,项目名称:sam2Aurora,代码行数:11,代码来源:OSSL_Api.cs


示例15: llSetContentType

        public void llSetContentType (LSL_Key id, LSL_Integer type)
        {
            if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;

            string content_type = "text/plain";
            if(type == ScriptBaseClass.CONTENT_TYPE_TEXT)
                content_type = "text/plain";
            else if(type == ScriptBaseClass.CONTENT_TYPE_HTML)
                content_type = "text/html";

            if(m_UrlModule != null)
                m_UrlModule.SetContentType(new UUID(id), content_type);
        }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:13,代码来源:LSL_Api.cs


示例16: llGetAgentList

        /// <summary>
        ///     http://wiki.secondlife.com/wiki/LlGetAgentList
        ///     The list of options is currently not used in SL
        ///     scope is one of:-
        ///     AGENT_LIST_REGION - all in the region
        ///     AGENT_LIST_PARCEL - all in the same parcel as the scripted object
        ///     AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the
        ///     current parcel.
        /// </summary>
        public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
                return new LSL_List();

            // the constants are 1, 2 and 4 so bits are being set, but you
            // get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4
            bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION;
            bool parcelOwned = scope == ScriptBaseClass.AGENT_LIST_PARCEL_OWNER;
            bool parcel = scope == ScriptBaseClass.AGENT_LIST_PARCEL;
            LSL_List result = new LSL_List();

            if (!regionWide && !parcelOwned && !parcel)
            {
                result.Add("INVALID_SCOPE");
                return result;
            }

            Vector3 pos;
            UUID id = UUID.Zero;

            if (parcel || parcelOwned)
            {
                pos = m_host.GetWorldPosition();
                IParcelManagementModule parcelManagement = World.RequestModuleInterface<IParcelManagementModule>();
                ILandObject land = parcelManagement.GetLandObject(pos.X, pos.Y);
                if (land == null)
                {
                    id = UUID.Zero;
                }
                else
                {
                    if (parcelOwned)
                    {
                        id = land.LandData.OwnerID;
                    }
                    else
                    {
                        id = land.LandData.GlobalID;
                    }
                }
            }

            World.ForEachScenePresence(delegate(IScenePresence ssp)
                                           {
                                               // Gods are not listed in SL

                                               if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent)
                                               {
                                                   if (!regionWide)
                                                   {
                                                       pos = ssp.AbsolutePosition;
                                                       IParcelManagementModule parcelManagement =
                                                           World.RequestModuleInterface<IParcelManagementModule>();
                                                       ILandObject land = parcelManagement.GetLandObject(pos.X, pos.Y);
                                                       if (land != null)
                                                       {
                                                           if (parcelOwned && land.LandData.OwnerID == id ||
                                                               parcel && land.LandData.GlobalID == id)
                                                           {
                                                               result.Add(ssp.UUID.ToString());
                                                           }
                                                       }
                                                   }
                                                   else
                                                   {
                                                       result.Add(ssp.UUID.ToString());
                                                   }
                                               }

                                               // Maximum of 100 results
                                               if (result.Length > 99)
                                               {
                                                   return;
                                               }
                                           });
            return result;
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:87,代码来源:LSL_Api.cs


示例17: llSetAngularVelocity

        public void llSetAngularVelocity (LSL_Vector force, LSL_Integer local)
        {
            if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
            Vector3 rotvelocity = new Vector3((float)force.x, (float)force.y, (float)force.z);
            if(local == 1)
            {
                Quaternion grot = m_host.GetWorldRotation();
                Quaternion AXgrot = grot;
                Vector3 AXimpulsei = rotvelocity;
                Vector3 newimpulse = AXimpulsei * AXgrot;
                rotvelocity = newimpulse;
            }

            if(m_host.ParentEntity.RootChild.PhysActor != null)
                m_host.ParentEntity.RootChild.PhysActor.RotationalVelocity = rotvelocity;
        }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:16,代码来源:LSL_Api.cs


示例18: llSetPhysicsMaterial

        public void llSetPhysicsMaterial(LSL_Integer bits, LSL_Float density, LSL_Float friction, LSL_Float restitution,
                                         LSL_Float gravityMultiplier)
        {
            ObjectFlagUpdatePacket.ExtraPhysicsBlock[] blocks = new ObjectFlagUpdatePacket.ExtraPhysicsBlock[1];
            blocks[0] = new ObjectFlagUpdatePacket.ExtraPhysicsBlock();
            if ((bits & ScriptBaseClass.DENSITY) == ScriptBaseClass.DENSITY)
                m_host.Density = (float) density;
            else
                blocks[0].Density = m_host.Density;

            if ((bits & ScriptBaseClass.FRICTION) == ScriptBaseClass.FRICTION)
                m_host.Friction = (float) friction;
            else
                blocks[0].Friction = m_host.Friction;

            if ((bits & ScriptBaseClass.RESTITUTION) == ScriptBaseClass.RESTITUTION)
                m_host.Restitution = (float) restitution;
            else
                blocks[0].Restitution = m_host.Restitution;

            if ((bits & ScriptBaseClass.GRAVITY_MULTIPLIER) == ScriptBaseClass.GRAVITY_MULTIPLIER)
                m_host.GravityMultiplier = (float) gravityMultiplier;
            else
                blocks[0].GravityMultiplier = m_host.GravityMultiplier;

            bool UsePhysics = ((m_host.Flags & PrimFlags.Physics) != 0);
            bool IsTemporary = ((m_host.Flags & PrimFlags.TemporaryOnRez) != 0);
            bool IsPhantom = ((m_host.Flags & PrimFlags.Phantom) != 0);
            bool IsVolumeDetect = m_host.VolumeDetectActive;
            blocks[0].PhysicsShapeType = m_host.PhysicsType;
            if (m_host.UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, IsVolumeDetect, blocks))
                m_host.ParentEntity.RebuildPhysicalRepresentation(true, null);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:33,代码来源:LSL_Api.cs


示例19: llLinkSitTarget

        public void llLinkSitTarget (LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
        {
            if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;

            // LSL quaternions can normalize to 0, normal Quaternions can't.
            if(rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
                rot.z = 1; // ZERO_ROTATION = 0,0,0,1

            List<ISceneChildEntity> entities = GetLinkParts(link);
            if(entities.Count == 0)
                return;

            entities[0].SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
            entities[0].SitTargetOrientation = Rot2Quaternion(rot);
        }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:15,代码来源:LSL_Api.cs


示例20: llGetLinkMedia

        public LSL_List llGetLinkMedia (LSL_Integer link, LSL_Integer face, LSL_List rules)
        {
            if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return new LSL_List();

            List<ISceneChildEntity> entities = GetLinkParts(link);
            if(entities.Count == 0 || face < 0 || face > entities[0].GetNumberOfSides() - 1)
                return new LSL_List();
            else
                return GetPrimMediaParams(entities[0], face, rules);
        }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:10,代码来源:LSL_Api.cs



注:本文中的Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LSL_Types.LSLString类代码示例发布时间:2022-05-24
下一篇:
C# LSL_Types.LSLFloat类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap