Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 767679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:03:45+00:00 2026-05-14T18:03:45+00:00

// Particle Stuct Instance private Sprite[] mParticles = new Sprite[10]; /// Particle emitter Properties

  • 0

// Particle Stuct Instance
private Sprite[] mParticles = new Sprite[10];

/// Particle emitter Properties
private Context mContext;

private int mPositionX, mPositionY, mWidth, mHeight, mNumParticles;


private Rect srcRect, dstRect;

/*** Constructor ! ***/
public ParticleEmitter(Context c, Sprite spriteImage, int num_particles) {

    super(c);
    mContext = c;

    Sprite[] Particles = new Sprite[10];

    Particles[0] = new Sprite(mContext, R.drawable.icon);

//  mParticles = spriteImage;
    //mParticles[num_particles].InitAttributes(c, R.drawable.icon);

    // Allocate Particles instances and copy into mParticle member
    //mParticles = new Sprite[num_particles];
 //   Sprite sprite1 =  new Sprite(mContext, R.drawable.icon);
//    Sprite sprite2 =  new Sprite(mContext, R.drawable.icon);

  //  mParticles[0] = spriteImage;
   // mParticles[1] =  sprite2;
/*  for(int i = 0; i < num_particles; i++)
    {
       mParticles[i].InitAttributes(mContext, R.drawable.icon);
       mParticles[i].setXPosition(i);
    }  */

//   mParticles[0].InitAttributes(mContext, R.drawable.icon);


    // nullify our positioning attributes
    mPositionX = mPositionY = 0;

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:03:46+00:00Added an answer on May 14, 2026 at 6:03 pm

    When you say new Sprite[10] is creates an array of ten Sprite references, which are all equal to null by default. It does not create any new Sprite objects. After this, you’ll likely want to create a new Sprite object to stick in each of these ten places. For example:

    Sprite[] rgSprite = new Sprite[10];
    for (int i = 0; i < rgSprite.length; i++) {
        rgSprite[i] = new Sprite(mContext, R.drawable.icon);
    }
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to use the great particle emitter which Michael Daley build for his
So I'm working on a particle emitter with javascript and canvas. And I want
I have a particle system where the positions and various properties are stored in
I have a particle system that as usually creates new particles, updates them and
I have an object called particle that has its own properties (position, velocity, etc.)
I'm writing a particle system manager with SlimDX/D3D11, and I'm finding some problems with
Imagine you are simulating particle physics. You, then, have a position vector for each
we have a particle detector hard-wired to use 16-bit and 8-bit buffers. Every now
I have made a particle generator with Jquery it works fine but it is
I am building a simple particle system and want to use a single array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.