コード例 #1
0
    private static int set_alignment(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            ParticleSystemRenderer    particleSystemRenderer = (ParticleSystemRenderer)obj;
            ParticleSystemRenderSpace alignment = (ParticleSystemRenderSpace)((int)ToLua.CheckObject(L, 2, typeof(ParticleSystemRenderSpace)));
            particleSystemRenderer.alignment = alignment;
            result = 0;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index alignment on a nil value");
        }
        return(result);
    }
コード例 #2
0
    private static int get_alignment(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            ParticleSystemRenderer    particleSystemRenderer = (ParticleSystemRenderer)obj;
            ParticleSystemRenderSpace alignment = particleSystemRenderer.alignment;
            ToLua.Push(L, alignment);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index alignment on a nil value");
        }
        return(result);
    }
コード例 #3
0
        protected override void ReadFromImpl(object obj)
        {
            base.ReadFromImpl(obj);
            ParticleSystemRenderer uo = (ParticleSystemRenderer)obj;

            mesh                = ToID(uo.mesh);
            alignment           = uo.alignment;
            renderMode          = uo.renderMode;
            sortMode            = uo.sortMode;
            lengthScale         = uo.lengthScale;
            velocityScale       = uo.velocityScale;
            cameraVelocityScale = uo.cameraVelocityScale;
            normalDirection     = uo.normalDirection;
            sortingFudge        = uo.sortingFudge;
            minParticleSize     = uo.minParticleSize;
            maxParticleSize     = uo.maxParticleSize;
            pivot               = uo.pivot;
            maskInteraction     = uo.maskInteraction;
            trailMaterial       = ToID(uo.trailMaterial);
            enableGPUInstancing = uo.enableGPUInstancing;
            shadowBias          = uo.shadowBias;
            flip                = uo.flip;
            allowRoll           = uo.allowRoll;
        }