当前位置: 首页>>代码示例>>C#>>正文


C# ScriptThread.GetIntegerParameter方法代码示例

本文整理汇总了C#中BinaryPhoenix.Fusion.Runtime.Scripting.ScriptThread.GetIntegerParameter方法的典型用法代码示例。如果您正苦于以下问题:C# ScriptThread.GetIntegerParameter方法的具体用法?C# ScriptThread.GetIntegerParameter怎么用?C# ScriptThread.GetIntegerParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BinaryPhoenix.Fusion.Runtime.Scripting.ScriptThread的用法示例。


在下文中一共展示了ScriptThread.GetIntegerParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateAnimationProcessB

 public void CreateAnimationProcessB(ScriptThread thread)
 {
     EntityNode entity = ((NativeObject)thread.GetObjectParameter(0)).Object as EntityNode;
     if (entity == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called CreateAnimationProcess with an invalid object.", LogAlertLevel.Error);
         return;
     }
     thread.SetReturnValue(new ProcessScriptObject(new AnimationProcess(entity, (AnimationMode)thread.GetIntegerParameter(1), thread.GetIntegerParameter(2), thread.GetIntegerParameter(3), thread.GetIntegerParameter(4))));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:10,代码来源:Process.cs

示例2: CommandLineValue

        public void CommandLineValue(ScriptThread thread)
        {
            string commandLine = thread.GetStringParameter(0);
            int valueIndex = thread.GetIntegerParameter(1);

            foreach (string arg in Engine.GlobalInstance.CommandLineArguments)
            {
                string[] value = new string[0];
                string command = arg;
                int colonIndex = arg.IndexOf(':');

                // Seperate values and command if a colon exists.
                if (colonIndex >= 0)
                {
                    value = new string[1];
                    value[0] = arg.Substring(colonIndex + 1, arg.Length - colonIndex - 1);
                    if (value[0].IndexOf(",") >= 0) value = value[0].Split(new char[1] { ',' });
                    command = arg.Substring(0, colonIndex);
                }

                if (command.ToLower() == commandLine.ToLower())
                {
                    if (valueIndex < 0 || valueIndex >= value.Length)
                    {
                        DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called CommandLineValue with an invalid value index.", LogAlertLevel.Error);
                        return;
                    }
                    thread.SetReturnValue(value[valueIndex]);
                    return;
                }
            }

            DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called CommandLineValue with a non-existant command line.", LogAlertLevel.Error);
        }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:34,代码来源:Engine.cs

示例3: SeekStream

 public void SeekStream(ScriptThread thread)
 {
     ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;
     if (stream == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called SeekStream with an invalid object.", LogAlertLevel.Error);
         return;
     }
     stream.Stream.Position = thread.GetIntegerParameter(1);
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:10,代码来源:IO.cs

示例4: PauseThread

 public void PauseThread(ScriptThread thread)
 {
     ScriptThread actionThread = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptThread;
     if (actionThread == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called PauseThread with an invalid object.", LogAlertLevel.Error);
         return;
     }
     actionThread.Pause(thread.GetIntegerParameter(0));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:10,代码来源:Thread.cs

示例5: OpenStream

 public void OpenStream(ScriptThread thread)
 {
     Stream stream = StreamFactory.RequestStream(thread.GetStringParameter(0), (StreamMode)thread.GetIntegerParameter(1));
     if (stream == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called OpenStream with an unreachable url.", LogAlertLevel.Error);
         return;
     }
     thread.SetReturnValue(new StreamScriptObject(new ScriptStream(stream)));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:10,代码来源:IO.cs

示例6: GameFlagValueAtIndex

 public void GameFlagValueAtIndex(ScriptThread thread)
 {
     int index = thread.GetIntegerParameter(0);
     int currentIndex = 0;
     foreach (string value in Fusion.GlobalInstance.GameFlags.Values)
     {
         if (index == currentIndex)
         {
             thread.SetReturnValue(value);
             return;
         }
         currentIndex++;
     }
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:14,代码来源:Fusion.cs

示例7: PadLeftA

 public void PadLeftA(ScriptThread thread)
 {
     thread.SetReturnValue(thread.GetStringParameter(0).PadLeft(thread.GetIntegerParameter(1)));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:4,代码来源:String.cs

示例8: Insert

 public void Insert(ScriptThread thread)
 {
     thread.SetReturnValue(thread.GetStringParameter(0).Insert(thread.GetIntegerParameter(2), thread.GetStringParameter(1)));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:4,代码来源:String.cs

示例9: LastIndexOfB

 public void LastIndexOfB(ScriptThread thread)
 {
     thread.SetReturnValue(thread.GetStringParameter(0).LastIndexOf(thread.GetStringParameter(1), thread.GetIntegerParameter(2)));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:4,代码来源:String.cs

示例10: RandomB

 public void RandomB(ScriptThread thread)
 {
     thread.SetReturnValue(MathMethods.Random(thread.GetIntegerParameter(0), thread.GetIntegerParameter(1)));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:4,代码来源:Mathmatics.cs

示例11: SeedRandom

 public void SeedRandom(ScriptThread thread)
 {
     MathMethods.SeedRandom(thread.GetIntegerParameter(0));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:4,代码来源:Mathmatics.cs

示例12: EntityHitTestB

 public void EntityHitTestB(ScriptThread thread)
 {
     EntityNode entitya = ((NativeObject)thread.GetObjectParameter(0)).Object as EntityNode;
     if (entitya == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called EntityHitTest with an invalid object.", LogAlertLevel.Error);
         return;
     }
     CollisionRectangle rect = new CollisionRectangle(new Transformation(thread.GetIntegerParameter(1), thread.GetIntegerParameter(2), 0, 0, 0, 0, 1, 1, 1), thread.GetIntegerParameter(3), thread.GetIntegerParameter(4));
     rect.Layers = entitya.CollisionPolygon.Layers;
     thread.SetReturnValue(entitya.CollisionPolygon.HitTest(rect));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:12,代码来源:Entity.cs

示例13: ConnectToServer

 public void ConnectToServer(ScriptThread thread)
 {
     Networking.NetworkManager.ServerIP = thread.GetStringParameter(0);
     if (thread.GetIntegerParameter(1) != -1) Networking.NetworkManager.Port = thread.GetIntegerParameter(1);
     thread.SetReturnValue(Networking.NetworkManager.Start());
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:6,代码来源:Networking.cs

示例14: CreateAnimationProcessD

 public void CreateAnimationProcessD(ScriptThread thread)
 {
     EntityNode entity = ((NativeObject)thread.GetObjectParameter(0)).Object as EntityNode;
     int memoryIndex = thread.GetArrayParameter(3);
     if (entity == null || memoryIndex == 0)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called CreateAnimationProcess with an invalid object.", LogAlertLevel.Error);
         return;
     }
     int arrayLength = thread.GetArrayLength(memoryIndex);
     int[] frames = new int[arrayLength];
     for (int i = 0; i < arrayLength; i++)
         frames[i] = thread.GetIntArrayElement(memoryIndex, i);
     thread.SetReturnValue(new ProcessScriptObject(new AnimationProcess(entity, (AnimationMode)thread.GetIntegerParameter(1), thread.GetIntegerParameter(2), frames)));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:15,代码来源:Process.cs

示例15: BindKey

 public void BindKey(ScriptThread thread)
 {
     InputManager.BindKey(thread.GetStringParameter(0),(KeyCodes)thread.GetIntegerParameter(1));
 }
开发者ID:HampsterEater,项目名称:FusionGameEngine,代码行数:4,代码来源:Input.cs


注:本文中的BinaryPhoenix.Fusion.Runtime.Scripting.ScriptThread.GetIntegerParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。