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

Pages: 1 2 [3]
31
Support / Re: Possible to detect trigger enters with each frame?
« on: July 18, 2014, 05:45:11 pm »
If the OnTriggerEnter2D method is on your explosion sprite, it could be triggering for the first entity it kills but is not leaving that entity before hitting a new one (So it doesn't fire a new OnTriggerEnter2D).

You could move the trigger event onto the entities that are being hit by the explosion - that way they are all monitoring their own OnTriggerEnter2D event.

If you want to leave your trigger on the explosion, you might be able to use OnTriggerStay2D - this will fire every frame that an object is detected within the explosion collider. However, this might still just keep returning the first entity that triggered the OnTriggerEnter2D, so not sure if that would work.

32
Support / Re: Is it possible to assign a clip to a class property?
« on: May 19, 2014, 06:25:45 am »
Sorry to be a dummy, but what do you mean by animation collection being a serializable class? I have a rough idea of what a serializable class is, but I'm not sure how it would help.  :o

33
Support / Is it possible to assign a clip to a class property?
« on: May 17, 2014, 09:58:08 pm »
Hi all

I have a script called "Health" which just does some general health tracking on the game object. It also has a method inside it called "Killed()", which fires when the health drops below 1. My plan was to have a class property which takes a Clip from the tk2d animator and then play it. The problem is there doesn't seem to be a property that allows me to just assign a Clip to a script.

I had a look at the Mole tutorial and it appears in there they have a game object which contains a tk2d sprite animator (for the dust animation), then they instantiate that game object whenever they need an animation. I guess this would work, but it seems a little redundant to have a collection of clips in my animation collection (ie. Running, Jumping, Dying), but then have to create a second set of prefabs also called Running, Jumping, Dying, which are instantiated as needed.

Can clips be chosen directly as class properties? If not, is creating a list of matching prefabs and animation clips the best way to go? Is there a cleaner way to do this?

Cheers!

34
Support / Re: Managing UI Z-Index
« on: January 14, 2014, 04:00:54 am »
Cool, I'll have a go at implementing that. Thanks!

35
Support / Managing UI Z-Index
« on: January 12, 2014, 08:14:31 pm »
Hi all

I'm building out the UI for my game uses a lot of windows and icons. Up until now I've been managing the sort-order by manually assigning the position-z, but as the UI gets more complex it's becoming hard to manage (especially since some of the position-z values cannot be known in advance).

In Unity there are some helper methods like "GUI.FocusWindow" and "GUI.BringWindowToFront" - Are there anything equivalent of this in tk2d?

Cheers!

36
Support / Re: Possible to suck color from sprites?
« on: December 23, 2013, 11:37:42 pm »
There's two ways I know of.

1) Full screen shaders, which apparently are a Pro only feature.
2) Apply a material shader to the sprite. I found a pretty good shader on the forums which I applied to my sprites. I found turning down the saturation rather than messing about with the colour channels gave a much better grayscale look.

Note that if you go option #2, you'll need to create a second material in tk2d, otherwise it will apply to all your sprites in the sprite collection. I'm rather new to tk2d myself, so there might be a better way of that.

37
Support / Re: A few questions about mixing Unity2D with tk2d.
« on: November 23, 2013, 08:05:58 pm »
Awesome awesome, thanks for the replies :)

I'll be buying my copy this afternoon then :D

Side note, the integration with 4.3 is a great move for tk2D. As Unity2D adds more stuff to the API I suspect that tk2D will always be a step ahead. So yeah, as someone new to tk2D I think this plugin has a bright future ahead of it (which I mention in response to some doom-sayers on the unity forums I've seen declaring "All 2D plugins are dead! Run for the hills!) :)

38
Support / A few questions about mixing Unity2D with tk2d.
« on: November 23, 2013, 05:29:00 am »
Hi there!

I have a few questions about 2D toolkit before buying a copy if you don't mind :)

1) If I use a tk2D sprite, does that limit anything you can do in the Unity editor? For example, animations, sorting/managing layers etc.

2) If I use the built in Unity2D sprite, can I still use the sprites from a sprite collection?

3) Does a tk2D sprite work fine with other 2D components of Unity2D like RigidBody2D and/or Box Collider 2D?

For the most part I'd be fine using all of the tools tk2D provide over Unity2D, I just want to make sure I'm not going to paint myself into a corner where I find out 3 months from now that Unity's collision detection system only work with their sprites :)

Thanks!

Pages: 1 2 [3]