/// <summary> /// copy constructor /// </summary> /// <param name="p">existing particle to copy</param> public Particle(Particle p) : this() { lifeLeft = p.lifeLeft; lifeLength = p.lifeLength; position = p.position; velocity = p.velocity; acceleration = p.acceleration; decay = p.decay; texture = p.texture; colour = p.colour; sizeScale = p.sizeScale; depth = p.depth; colourGraph = p.colourGraph; sizeGraph = p.sizeGraph; rotationGraph = p.rotationGraph; }
//construct /// <summary> /// create particle with default values /// </summary> public Particle() { lifeLeft = 1.0f; lifeLength = 1.0f; position = new Vector2(); velocity = new Vector2(); acceleration = new Vector2(); decay = new Vector2(); //texture = colour = Color.White; sizeScale = 1.0f; depth = 0.0f; colourGraph = new EmptyVectorGraph(); colourMulti = 0.0f; sizeGraph = new EmptyVectorGraph(); sizeMulti = 0.0f; rotationGraph = new EmptyVectorGraph(); rotationMulti = 0.0f; currentTick = 0; }