Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - neo750a

Pages: [1]
1
Support / Re: Randomly instantiating sprites in a sprite collection?
« on: January 05, 2014, 01:19:59 am »
Create a prefab of a sprite from the sprite collection, instantiate it and then change the sprite Id using something like this:

Code: [Select]
int randomSprite = 0;
do {
  randomSprite = Random.Range(0, sprite.Collection.Count);
} while (!sprite.Collection.spriteDefinitions[randomSprite].Valid);
sprite.SetSprite( randomSprite);

the while loop is necessary in case you have deleted / invalid sprites in your collection.

I have to say, thank very much for the response!  Sorry for the long reply.  This helped me out immensely!

2
Support / Randomly instantiating sprites in a sprite collection?
« on: December 28, 2013, 01:24:57 am »
Is this possible?  Or do i have to make a database myself and store prefabs to achieve this?  It would be immensely helpful if I could as it would cut out alot of what I need done.  What I am trying to do is to display 6 different sprites on 6 random points(one unique sprite each point) on the game view.  Thanks in advance and sorry if this was asked previously.

3
Support / About AnimationCompleted and AnimationEventTriggered
« on: May 24, 2013, 01:16:59 am »
I would very much like an example using these methods or whatever these are(I forget the terminology).  I am using the 2.x version of 2dtoolkit.  I was trying to follow tutorials on the Documentation page but it seems out of date and I would like to learn more about the two methods I have just stated.  Thx in advance!

4
Support / Need an example that uses the On Frame Trigger Event.
« on: January 12, 2013, 09:11:24 pm »
I've seen some examples but they are not very clear to me and was wondering if there was an example to how it works.  Any help with this?

Pages: [1]