makeParticles() public method

Create the particles to be used
public makeParticles ( Microsoft.Xna.Framework.Graphics.Texture2D Graphic, bool Multiple = false, uint Quantity = 50, float Rotation = 1f, float Collide = 0.8f ) : FlxEmitter
Graphic Microsoft.Xna.Framework.Graphics.Texture2D
Multiple bool Whether or not the Texture contains multiple sprites for particles
Quantity uint The number of particles to generate
Rotation float The amount of rotation in degrees per frame, so keep this number low
Collide float The collidability of the particle, 1 = Full and 0 = None
return FlxEmitter
Esempio n. 1
0
        public Player(int X = 0, int Y = 0)
            : base(X, Y)
        {
            maxVelocity = new FlxPoint(100, 100);
            drag = new FlxPoint(500, 500);
            makeGraphic(40, 40, FlxColor.CADETBLUE);

            _currPos = new FlxPoint(x, y);
            _lastPos = new FlxPoint(x, y);
            _nodes = new List<FlxPoint>();
            _nodes.Add(_lastPos);
            _nodes.Add(_currPos);
            _path = new FlxPath(_nodes);

            footsteps = new FlxEmitter(x + width / 2, y + height / 2, 0, this);
            footsteps.makeParticles(FlxG.content.Load<Texture2D>("footsteps"), true, 25, 0f, 0f);
            footsteps.setXSpeed();
            footsteps.setYSpeed();

            _indoors = false;
        }
Esempio n. 2
0
        public Player(int X = 0, int Y = 0)
            : base(X, Y)
        {
            maxVelocity = new FlxPoint(100, 100);
            drag        = new FlxPoint(500, 500);
            makeGraphic(40, 40, FlxColor.CADETBLUE);

            _currPos = new FlxPoint(x, y);
            _lastPos = new FlxPoint(x, y);
            _nodes   = new List <FlxPoint>();
            _nodes.Add(_lastPos);
            _nodes.Add(_currPos);
            _path = new FlxPath(_nodes);

            footsteps = new FlxEmitter(x + width / 2, y + height / 2, 0, this);
            footsteps.makeParticles(FlxG.content.Load <Texture2D>("footsteps"), true, 25, 0f, 0f);
            footsteps.setXSpeed();
            footsteps.setYSpeed();

            _indoors = false;
        }