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

Pages: [1]
1
Support / Re: Flipping an Animated Sprite
« on: December 04, 2013, 06:22:32 pm »
The console said that "Type `tk2dBaseSprite' does not contain a definition for `Transform' and no extension method `Transform' of type `tk2dBaseSprite' could be found". Does 'Transform' not work when using 2dtk sprites?

2
Support / Re: Flipping an Animated Sprite
« on: December 04, 2013, 06:04:07 pm »
Thank you. That definitely helps, but I'm not exactly sure how to actually script and tell my sprite to scale it's x value. I'm a novice when it comes to programming...

3
Support / Flipping an Animated Sprite
« on: December 04, 2013, 05:44:46 pm »
Hello,

I am trying to figure out a way to horizontally flip my animated sprite on a key input when it changes in the x-direction. I am using the TutorialAnimController tutorial I found HERE

So for example when the user presses the A key (going left) I want the sprite to mirror and face the direction the sprite is moving in. I'm guessing it would be somewhere in this if statement (C#):
Code: [Select]

if (Input.GetKeyDown(KeyCode.A)) {
            if (!anim.IsPlaying("walk")) {

         
                anim.Play("walk");

                anim.AnimationCompleted = null;
                walking = true;

}
        }

If anyone knows a way to flip the sprite horizontally in the code that would be greatly appreciated.

Pages: [1]