public ParticleParamaters(
     double start,
     double end,
     ParticleDirection particleDir,
     Vector2Range pos, OsbEasing ease,
     double dur, int partAmmount,
     bool randX       = false, bool randY         = true,
     bool sameYEnd    = false, bool randomYEnd    = false,
     Vector2?scale    = null, bool randomScale    = false,
     Vector2?rotation = null, bool randomRotation = false,
     double fade      = 1
     )
 {
     this.direction       = particleDir;
     this.Positions       = pos;
     this.easing          = ease;
     this.duration        = dur;
     this.particleAmmount = partAmmount;
     this.randomX         = randX;
     this.randomY         = randY;
     this.startTime       = start;
     this.endTime         = end;
     this.scale           = ((Vector2)scale).Equals(null) ? (Vector2)scale : new Vector2(1, 1);
     this.rotation        = ((Vector2)rotation).Equals(null) ? (Vector2)rotation : new Vector2(0, 0);
     this.randomRotation  = randomRotation;
     this.randomScale     = randomScale;
     this.sameYEnd        = sameYEnd;
     this.fade            = fade;
     this.randomYEnd      = randomYEnd;
 }
예제 #2
0
 public ParticleEmitterSettings()
 {
     Name       = "";
     loop       = true;
     blendState = BlendState.AlphaBlend;
     frequency  = new FloatRange();
     lifeTime   = new FloatRange();
     position   = new Vector2Range();
     velocity   = new Vector2Range();
     startScale = new Vector2Range()
     {
         min = Vector2.One, max = Vector2.One
     };
     endScale = new Vector2Range()
     {
         min = Vector2.One, max = Vector2.One
     };
     rotation   = new FloatRange();
     startColor = new ColorRange()
     {
         min = Color.White, max = Color.White
     };
     endColor = new ColorRange()
     {
         min = Color.White, max = Color.White
     };
     gravity    = new Gravity();
     sources    = new int[] { 0 };
     spawnCount = 1;
     capacity   = 64;
 }
예제 #3
0
    public static Vector2 Random(this Vector2Range range)
    {
        var result = new Vector2()
        {
            x = UnityEngine.Random.Range(range.min.x, range.max.x),
            y = UnityEngine.Random.Range(range.min.y, range.max.y)
        };

        return(result);
    }
예제 #4
0
        protected Emitter()
        {
            Particals                = new List <Partical>();
            Initial_Colour           = new ColourRange(Color.White, Color.White);
            Initial_LifeTime         = new FloatRange(1, 1);
            Initial_Velocity         = new Vector2Range(new Vector2(5, 0), new Vector2(5, 0));
            Initial_Rotaiton         = new FloatRange(0, 0);
            Initial_Angulor_Velocity = new FloatRange(0, 0);
            Initial_Scale            = new FloatRange(1, 1);

            Modifyers = new List <Modifyer>();
        }