static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.ParticleSystem.Burst o;
         if (argc == 3)
         {
             System.Single a1;
             checkType(l, 2, out a1);
             System.Int16 a2;
             checkType(l, 3, out a2);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 4)
         {
             System.Single a1;
             checkType(l, 2, out a1);
             System.Int16 a2;
             checkType(l, 3, out a2);
             System.Int16 a3;
             checkType(l, 4, out a3);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static bool EmissionModule_SetBursts__Burst_Array__Int32(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 2)
        {
            UnityEngine.ParticleSystem.Burst[] arg0 = JSDataExchangeMgr.GetJSArg <UnityEngine.ParticleSystem.Burst[]>(() =>
            {
                int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg);
                int length  = JSApi.getArrayLength(jsObjID);
                var ret     = new UnityEngine.ParticleSystem.Burst[length];
                for (var i = 0; i < length; i++)
                {
                    JSApi.getElement(jsObjID, i);
                    ret[i] = (UnityEngine.ParticleSystem.Burst)JSMgr.datax.getObject((int)JSApi.GetType.SaveAndRemove);
                }
                return(ret);
            });
            System.Int32 arg1 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg);
            UnityEngine.ParticleSystem.EmissionModule argThis = (UnityEngine.ParticleSystem.EmissionModule)vc.csObj;        argThis.SetBursts(arg0, arg1);
            JSMgr.changeJSObj(vc.jsObjID, argThis);
        }

        return(true);
    }
	static public int constructor(IntPtr l) {
		try {
			int argc = LuaDLL.lua_gettop(l);
			UnityEngine.ParticleSystem.Burst o;
			if(argc==3){
				System.Single a1;
				checkType(l,2,out a1);
				System.Int16 a2;
				checkType(l,3,out a2);
				o=new UnityEngine.ParticleSystem.Burst(a1,a2);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			else if(argc==4){
				System.Single a1;
				checkType(l,2,out a1);
				System.Int16 a2;
				checkType(l,3,out a2);
				System.Int16 a3;
				checkType(l,4,out a3);
				o=new UnityEngine.ParticleSystem.Burst(a1,a2,a3);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			return error(l,"New object failed.");
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int ctor_s(IntPtr l)
 {
     try {
         UnityEngine.ParticleSystem.Burst o;
         o = new UnityEngine.ParticleSystem.Burst();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static void Burst_minCount(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.ParticleSystem.Burst _this = (UnityEngine.ParticleSystem.Burst)vc.csObj;
         var result = _this.minCount;
         JSApi.setInt16((int)JSApi.SetType.Rval, (System.Int16)(result));
     }
     else
     {
         System.Int16 arg0 = (System.Int16)JSApi.getInt16((int)JSApi.GetType.Arg);
         UnityEngine.ParticleSystem.Burst _this = (UnityEngine.ParticleSystem.Burst)vc.csObj;
         _this.minCount = arg0;
         JSMgr.changeJSObj(vc.jsObjID, _this);
     }
 }
// fields

// properties
    static void Burst_time(JSVCall vc)
    {
        if (vc.bGet)
        {
            UnityEngine.ParticleSystem.Burst _this = (UnityEngine.ParticleSystem.Burst)vc.csObj;
            var result = _this.time;
            JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result));
        }
        else
        {
            System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg);
            UnityEngine.ParticleSystem.Burst _this = (UnityEngine.ParticleSystem.Burst)vc.csObj;
            _this.time = arg0;
            JSMgr.changeJSObj(vc.jsObjID, _this);
        }
    }
 static public int ctor__Single__MinMaxCurve_s(IntPtr l)
 {
     try {
         UnityEngine.ParticleSystem.Burst o;
         System.Single a1;
         checkType(l, 1, out a1);
         UnityEngine.ParticleSystem.MinMaxCurve a2;
         checkValueType(l, 2, out a2);
         o = new UnityEngine.ParticleSystem.Burst(a1, a2);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #8
0
    private void WriteBurst(UnityEngine.ParticleSystem.Burst data)
    {
        CommaNL();
        Indent();       jsonWriter.Write("{\n");
        IndentIn();

        CommaNL();
        Indent();       jsonWriter.Write("\"minCount\":" + data.minCount);

        CommaNL();
        Indent();       jsonWriter.Write("\"maxCount\":" + data.maxCount);

        CommaNL();
        Indent();       jsonWriter.Write("\"time\":" + data.time + "\n");

        IndentOut();
        Indent();       jsonWriter.Write("}");
    }
 static public int ctor__Single__Int16__Int16_s(IntPtr l)
 {
     try {
         UnityEngine.ParticleSystem.Burst o;
         System.Single a1;
         checkType(l, 1, out a1);
         System.Int16 a2;
         checkType(l, 2, out a2);
         System.Int16 a3;
         checkType(l, 3, out a3);
         o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #10
0
    private void WriteEmission()
    {
        var dataE = particleSys.emission;

        if (!dataE.enabled)
        {
            return;
        }
        CommaNL();
        Indent();       jsonWriter.Write("\"emission\":{\n");
        IndentIn();
        var bursts = new UnityEngine.ParticleSystem.Burst[dataE.burstCount];

        dataE.GetBursts(bursts);
        CommaNL();
        Indent();       jsonWriter.Write("\"rateOverDistanceMultiplier\":" + dataE.rateOverDistanceMultiplier);
        CommaNL();
        Indent();       jsonWriter.Write("\"rateOverTimeMultiplier\":" + dataE.rateOverTimeMultiplier);

        WriteMinMaxCurve(dataE.rateOverDistance, "rateOverDistance");
        WriteMinMaxCurve(dataE.rateOverTime, "rateOverTime");

        CommaNL();
        Indent();       jsonWriter.Write("\"bursts\":[\n");
        IndentIn();

        if (bursts != null)
        {
            foreach (var v in bursts)
            {
                WriteBurst(v);
            }
        }
        jsonWriter.Write("\n");
        IndentOut();
        Indent();       jsonWriter.Write("]\n");
        /// bursts: [{time: 0.1, min: 3, max: 3}];
        //scope.WriteKeyValue("burstCount", data.burstCount);

        IndentOut();
        Indent();       jsonWriter.Write("}");
    }
    private static void FillEmissionModule(UnityEngine.ParticleSystem ups, ParticleSystem ps)
    {
        var emissionModule = ups.emission;

        emissionModule.enabled = true;
        var startTime = ups.main.duration;
        var particles = ps.RenderParam.ParticleNumber;

        if (ps.Emitter.startTime is OneDConst)
        {
            if (!ps.RenderParam.Loop)
            {
                emissionModule.rateOverTime = 0.0f;
                UnityEngine.ParticleSystem.Burst[] burst = new UnityEngine.ParticleSystem.Burst[1];
                burst[0].cycleCount     = 1;
                burst[0].minCount       = (short)particles;
                burst[0].maxCount       = (short)particles;
                burst[0].repeatInterval = startTime;
                burst[0].time           = ps.Emitter.startTime.getCurve().Evaluate(1.0f);
                emissionModule.SetBursts(burst);
            }
            else if (ps.RenderParam.Loop && ps.Emitter.startTime is OneDConst)
            {
                emissionModule.rateOverTime = 0.0f;
                UnityEngine.ParticleSystem.Burst[] burst = new UnityEngine.ParticleSystem.Burst[1];
                burst[0].cycleCount     = 1;
                burst[0].minCount       = (short)particles;
                burst[0].maxCount       = (short)particles;
                burst[0].repeatInterval = startTime;
                burst[0].time           = ps.Emitter.startTime.getCurve().Evaluate(1.0f);
                emissionModule.SetBursts(burst);
            }
        }
        else
        {
            emissionModule.rateOverTime = new UnityEngine.ParticleSystem.MinMaxCurve((particles /* + 0.1f*/) / (startTime));
        }
    }
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.ParticleSystem.Burst o;
         if (argc == 7)
         {
             System.Single a1;
             checkType(l, 3, out a1);
             System.Int16 a2;
             checkType(l, 4, out a2);
             System.Int16 a3;
             checkType(l, 5, out a3);
             System.Int32 a4;
             checkType(l, 6, out a4);
             System.Single a5;
             checkType(l, 7, out a5);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3, a4, a5);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 6)
         {
             System.Single a1;
             checkType(l, 3, out a1);
             UnityEngine.ParticleSystem.MinMaxCurve a2;
             checkValueType(l, 4, out a2);
             System.Int32 a3;
             checkType(l, 5, out a3);
             System.Single a4;
             checkType(l, 6, out a4);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 5)
         {
             System.Single a1;
             checkType(l, 3, out a1);
             System.Int16 a2;
             checkType(l, 4, out a2);
             System.Int16 a3;
             checkType(l, 5, out a3);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, "ctor__Single__Int16", argc, 2, typeof(float), typeof(System.Int16)))
         {
             System.Single a1;
             checkType(l, 3, out a1);
             System.Int16 a2;
             checkType(l, 4, out a2);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, "ctor__Single__MinMaxCurve", argc, 2, typeof(float), typeof(UnityEngine.ParticleSystem.MinMaxCurve)))
         {
             System.Single a1;
             checkType(l, 3, out a1);
             UnityEngine.ParticleSystem.MinMaxCurve a2;
             checkValueType(l, 4, out a2);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc <= 2)
         {
             o = new UnityEngine.ParticleSystem.Burst();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.ParticleSystem.Burst o;
         if (matchType(l, argc, 2, typeof(float), typeof(System.Int16)))
         {
             System.Single a1;
             checkType(l, 2, out a1);
             System.Int16 a2;
             checkType(l, 3, out a2);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 4)
         {
             System.Single a1;
             checkType(l, 2, out a1);
             System.Int16 a2;
             checkType(l, 3, out a2);
             System.Int16 a3;
             checkType(l, 4, out a3);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 6)
         {
             System.Single a1;
             checkType(l, 2, out a1);
             System.Int16 a2;
             checkType(l, 3, out a2);
             System.Int16 a3;
             checkType(l, 4, out a3);
             System.Int32 a4;
             checkType(l, 5, out a4);
             System.Single a5;
             checkType(l, 6, out a5);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3, a4, a5);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(float), typeof(UnityEngine.ParticleSystem.MinMaxCurve)))
         {
             System.Single a1;
             checkType(l, 2, out a1);
             UnityEngine.ParticleSystem.MinMaxCurve a2;
             checkValueType(l, 3, out a2);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 5)
         {
             System.Single a1;
             checkType(l, 2, out a1);
             UnityEngine.ParticleSystem.MinMaxCurve a2;
             checkValueType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             System.Single a4;
             checkType(l, 5, out a4);
             o = new UnityEngine.ParticleSystem.Burst(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 0)
         {
             o = new UnityEngine.ParticleSystem.Burst();
             pushValue(l, true);
             pushObject(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }