示例#1
0
        public void RenderEntity(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 RenderEntity with an invalid object.", LogAlertLevel.Error);
                return;
            }
            Transformation transformation = entity.CalculateTransformation();

            entity.Render(new Transformation(thread.GetFloatParameter(1) - transformation.X, thread.GetFloatParameter(2) - transformation.Y, thread.GetFloatParameter(3), 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f), null, entity.DepthLayer);
        }