Beispiel #1
0
        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)));
        }