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

Pages: 1 2 3 [4] 5
46
Support / Re: Purpose of Tile Maps
« on: July 03, 2012, 05:09:37 pm »
hi,

no pb :)

is the quality of tiles less than normal sprites or original image file ?

if i get you, the purpose is to spare memory AND paint instances of sprite on the same map thus reducing draw calls ?

47
Support / Re: tk2dAnimatedSprite.getFrame() function
« on: June 29, 2012, 06:25:00 pm »
yup, i'd be interested in this one too :)

48
Support / Re: Purpose of Tile Maps
« on: June 29, 2012, 09:45:19 am »
interesting, could you be more precise ?

49
Support / Purpose of Tile Maps
« on: June 28, 2012, 08:41:12 am »
hi,

yeah, well, everything's in the title i guess :)

Tile Maps is in beta but i'm not sure of its purpose. I'm using it as a way of drawing sprites which take part of the set (background, platforms etc...), well everything that repeats actually.

am i right ?

50
Support / Re: Repeat sprite
« on: June 27, 2012, 02:29:40 pm »
actually, in the meantime, i discovered your Tile Map tool and that's just what i was looking for :)


51
Support / Re: What next?
« on: June 27, 2012, 12:47:33 pm »
hi,

very new to unity and tk2d but saw the "ex2D" plugin and some good features could be part of tk2d maybe on top of what you (unikron) suggested :)

-2D Skeleton Animation Editor
- the nice sprite animation editor

cheers,

52
Support / Repeat sprite
« on: June 27, 2012, 09:09:13 am »
hi there,

what's the best way to achieve the following :

i'd like to make a pipes set. i've started to draw a small portion of it. my idea is to repeat this portion to create long pipes.

any idea ?

53
Support / Re: Collider
« on: June 26, 2012, 09:22:12 am »
ok thank you !

54
Support / Re: Collider
« on: June 26, 2012, 08:46:34 am »
nice, the min pen. did the trick, thanks :)

so what's the purpose of the tk2d camera then ?

55
Support / Re: Collider
« on: June 26, 2012, 08:40:42 am »
ho wait, there's a tk2d camera round here  ::)

but now my game panel doesn't show anything with this camera :(

i can see my scene in the camera preview (when the tk2d camera is selected) but nothing appears in the game panel...

56
Support / Re: Collider
« on: June 26, 2012, 08:36:16 am »
my camera ortho was set to 1.8 indeed, but now it is at 5 and still the same problem...

57
Support / Collider
« on: June 25, 2012, 03:09:59 pm »
hi,

i've put a cube in my scene with collider and rigidbody and i added an animated sprite onto it with its collider and rigidbody too.

when i hit play, the sprite goes through the cube a couple of pixels instead of sitting on top of it.

how can i fix that ?

58
Support / Re: delegate
« on: June 25, 2012, 02:47:19 pm »
finally,

i figured out the problem.

first of all, you were right. it is necessary to check if an animation is playing and which one, otherwise at each update it starts again (no animation visible then).

then, by using "A" and "D" as move keys, unity returns true only for the CURRENT FRAME even if the key stays pressed... instead i used horizontal values returned by getAxis.

here's my working code for information :

Code: [Select]
void Update ()
{
if (Input.GetKeyDown ("space")) { // jump
rigidbody.AddRelativeForce (transform.up * jumpSpeed, ForceMode.Impulse);
}

// if not hiding
if (!hiding) {

movement = Input.GetAxis ("Horizontal") * moveSpeed; 
movement *= Time.deltaTime; 
transform.Translate (movement, 0.0f, 0.0f);

if (Input.GetKeyDown (KeyCode.S)) { // hide
if (anim.isPlaying () && anim.CurrentClip.name != "hide" || !anim.isPlaying ())
anim.Play ("hide");
hiding = true;

} else if (Input.GetAxis ("Horizontal") > 0) { // walk right
if (anim.isPlaying () && anim.CurrentClip.name != "walk" || !anim.isPlaying ())
anim.Play ("walk");
if (!goingRight)
anim.FlipX ();
goingRight = true;

} else if (Input.GetAxis ("Horizontal") < 0) { // walk left
if (anim.isPlaying () && anim.CurrentClip.name != "walk" || !anim.isPlaying ())
anim.Play ("walk");
if (goingRight)
anim.FlipX ();
goingRight = false;

} else {
if (anim.isPlaying () && anim.CurrentClip.name != "idle" && anim.CurrentClip.name != "unhide" || !anim.isPlaying ()) {
anim.Play ("idle");
}
}

} else {

// unhide
if (Input.GetKeyDown (KeyCode.W)) {
if (anim.isPlaying () && anim.CurrentClip.name != "unhide" || !anim.isPlaying ()) {
anim.Play ("unhide");
}
hiding = false;
}
}
}

thank you for your help, i appreciated your responsiveness !

mike

59
Support / Re: delegate
« on: June 25, 2012, 12:10:26 pm »
it is called, a debug.log is printed when D is pressed.

60
Support / Re: delegate
« on: June 25, 2012, 11:14:44 am »
no problem, but you still have 2 objects in the code :

  if (animatedSprite.IsPlaying() && animatedSprite.CurrentClip.name != "walkleft")
      animation.Play("walkleft");
}

is this right ? or it's always the same object ?

about my code, no animation at all is playing. actually, it seems only the first frame of "idle" animation is drawn then nothing.... ?

Pages: 1 2 3 [4] 5