예제 #1
0
 public ShockWave(Texture t, float size, float lifetime, bool random)
 {
     Size = size;
     LifeTime = lifetime;
     f = size / (float)Math.Sqrt(lifetime);
     Mat = new Material();
     Mat.Additive = true;
     Mat.diffusemap = t;
     Mat.twosided = true;
     Mat.NoLighting = true;
     Mat.DepthWrite = false;
     Shader = Root.Instance.ResourceManager.LoadShader("shock.shader");
     CreateVertexBuffer();
     BaseMatrix = random?Matrix4Extensions.FromAngleAxis(VecRandom.Instance.NextUnitVector3(), 30.0f / 180.0f * (float)Math.PI):Matrix4.Identity;
 }
예제 #2
0
 public ParticleNebula(int max, Texture t, float radius, int pointsize)
     : base(max, t)
 {
     CreateNebula(radius, pointsize);
 }
예제 #3
0
 public ShockWave(Texture t, float size, float lifetime)
     : this(t,size,lifetime,true)
 {
 }
예제 #4
0
        public ParticleExplosion(Vector3 pos, int maxparticles, Texture t,
            float fadestarttime, float fadeendtime, float maxemitspeed, float maxemitaccel,
            int emittercount, float maxemitteragebase, float maxemitteragevar, float pointsize, Vector3 basespeed)
            : base(maxparticles, t)
        {
            FadeStartTime = fadestarttime;
            FadeEndTime = fadeendtime;
            MaxEmitterSpeed = maxemitspeed;
            MaxEmitterAccel = maxemitaccel;
            EmitterCount = emittercount;
            MaxEmitterAgeBase = maxemitteragebase;
            MaxEmitterAgeVariance = maxemitteragevar;
            PointSize = pointsize;
            BaseSpeed = basespeed;

            CreateExplosion(pos);
        }