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 - indy2005

Pages: [1] 2
1
Support / Re: How to Add Sprite Buttons
« on: March 12, 2014, 08:23:26 pm »
Hi,

I don't want a UI button, but really a good old fashioned sprite.

Regards

I

2
Support / How to Add Sprite Buttons
« on: March 11, 2014, 09:42:29 pm »
Hi,

If I want to add buttons for an iPad game using icons, whats the best approach to use please? 

Thanks

i

3
Support / How to instantiate a prefab
« on: September 09, 2013, 10:29:12 pm »
Hi,

How do I instantiate a tk2DSprite from a prefab.  I have an Assets/Resources/Prefabs folder in my project with an object I created as a tk2DSrite...but I am being told I am trying to instantiate a null object?

Also, do I instantiate a GameObject or a tk2DSprite object...(I am not sure if a tk2DSprite is just a component added to a normal game object and I need to use GetComponent to get the tk2DSprite from the game object....)

Code: [Select]
GameObject eggSprite = (GameObject) Instantiate(Resources.Load("Level_01_Egg"));
Any advice appreciated...I am trying to use C sharp.

Regards

Stephen

4
Support / Re: PlayMaker Actions
« on: September 04, 2013, 10:34:45 pm »
Thanks, it was the right version.  Deleted it from Library and reimported and got it.

5
Support / Re: PlayMaker Actions
« on: September 04, 2013, 03:46:14 pm »
Hi,

Not sure - not at my Unity3D pc at the moment.  But the Asset Store isnt asking me to update my 2D Toolkit version...so assume its the latest.

Regards

i

6
Support / Re: PlayMaker Actions
« on: September 04, 2013, 12:44:06 am »
Hi,

See my first post in this thread.  When I import from Asset Store 2D toolkit, all I seem to have is Goodies/TexturePacker - nothing linked to PlayMaker.  What have I done wrong?

Regards

i

7
Support / Re: PlayMaker Actions
« on: September 03, 2013, 11:40:23 pm »
Hi,

I imported 2d Toolkit after Playmaker, and can't see any 2D Toolkit actions in the action browser,  nor any reference in the Playmaker menu?  Which asset package are they part of...or do I have to download them separately from the main packages for PlayMaker and 2D TK.

Regards

i

8
Support / Re: Positioning with different resolutions
« on: September 03, 2013, 05:57:13 pm »
Thanks, will have a play!

9
Support / Positioning with different resolutions
« on: September 03, 2013, 09:39:40 am »
Hi,

How does positioning of sprites work when you switch in different SD/HD graphics?  I am coming from cocos2D where it used a point (not pixel) positioning...so you could place something at 10,10 and this was a points system so it new this was 10,10 for SD and 20,20 for HD and I didnt have to worry about it.  If I position things at 10,10,0 in the editor window when working in SD design mode, what happens when HD gets switched in?

Regards

i

10
Support / PlayMaker Actions
« on: September 02, 2013, 11:32:05 pm »
Hi,

I cant seem to see the PlayMaker actions under Goodies...I just registered my copy, and did a reimport hoping this would unlock it - but it didn't seem to.

Any advice appreciated.

i

11
Support / Re: MoleScript Question
« on: September 02, 2013, 10:59:52 pm »
Thanks, why is a wait for the next frame necessary here?

Code: [Select]
yield return null;
molesActive = 0;

12
Support / Re: Resolution Question
« on: September 02, 2013, 10:57:51 pm »
Thanks (again!)

13
Support / Resolution Question
« on: September 02, 2013, 09:07:10 pm »
Hi,

Why when choosing iPhone Wide (480 x 320), does my camera pick up a native resolution of 960 x 640, with a preview resolution of 480 x 320.  If I want to support SD and HD iPhone displays, should I start my workflow with a native resolution of 480 x 320, using SD graphics...and then create the 2x assets and swap them in via code?

Regards

i

14
Support / MoleScript Question
« on: September 02, 2013, 08:42:15 pm »
Hi,

I am new to coroutines, and am looking through the MainGameScript.

I have a few questions about the code below.

Code: [Select]
private IEnumerator MainGameLoop()
{
float hitTimeLimit = 1.0f;
int randomMole;

while(!gameEnd)
{
yield return StartCoroutine(OkToTrigger());
yield return new WaitForSeconds((float)Random.Range(1, timeLimitMS) / 1000.0f);

randomMole = (int)Random.Range(0, moles.Count - 1);

while(moles[randomMole].sprite.gameObject.activeSelf)
{
randomMole = (int)Random.Range(0, moles.Count - 1);
}

moles[ randomMole ].Trigger(hitTimeLimit);
hitTimeLimit -= hitTimeLimit <= 0.0f ? 0.0f : 0.01f; // Less time to hit the next mole

yield return null;
}
}

public void RegisterMole(MoleScript who)
{
moles.Add(who);
}

// Currently only 3 moles at a time can be active.  So if there are that many, then we can't trigger another one...
private IEnumerator OkToTrigger()
{
int molesActive;

do
{
yield return null;
molesActive = 0;

foreach(MoleScript mole in moles)
{
molesActive += mole.sprite.gameObject.activeSelf ? 1 : 0;
}
}
while(molesActive >= moleLimit);

yield break;
}

Could you explain this to me please:

Code: [Select]
yield return StartCoroutine(OkToTrigger());
and why this 'yield return null' is needed (i.e. what does it do as it seems to work when commented out:

Code: [Select]
do
{
yield return null;
molesActive = 0;

foreach(MoleScript mole in moles)
{
molesActive += mole.sprite.gameObject.activeSelf ? 1 : 0;
}
}

Many thanks.

I am also wondering when to do a yield return 0 instead of yield return null...but that's a 'brucie bonus' ;-)

i

15
Support / Re: Workflow to support multiple iOs Devices
« on: September 01, 2013, 02:39:02 pm »
Thanks...so you can use Preview Resolution to simulate different devices, and see the impact of different overrides?

Pages: [1] 2