Rayj

Array of graphics?

Recommended Posts

So, I am fairly new at Javascript programmng and totally new to Pixi.js.

 

How do I initilize an array with gif file names or pointers, so later I can call up the graphic

to display?   What I want to do is create a deck of playing cards and later deal them out.

I have the rendomization figured out already.

 

I have the graphic gif files representing each card of the 52 card deck named: h1.gif-h13.gif, c1.gif-c13.gif, d1.gif-d13.gif and s1.gif-s13.gif representing the suits Hearts, Clubs, Diamonds and spades respectively.  So card[0] would be Ace of Hearts.  card[1] = 2 of hearts,.... card[13] = king of hearts, card[14] = Ace of Diamonds, card[15] = 2 of Diamonds,

etc.  See attached example.

 

So the main thing I need is to populate the array size of 52 with the corresponding gif file names.

Thanks,

Ray

 

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.