I'm afraid that's a whole tutorial in itself. I know that Muddy Wolf has a video on Destructible Tiles and another on Spawning Tiles. I haven't tried them myself, but I know people who've found them useful. That might be a good place to start looking.
This is where I got it from: pixelfrog-assets.itch.io/tiny-swords/download/eyJpZCI6MTU5MTA3NywiZXhwaXJlcyI6MTcyODY3MTk4MX0%3d.iZd9E%2bburlTI7OBFGcq6dBGmCMQ%3d That should get you the full version that I'm using.
That should be just fine. Later, we will add a simple state machine to our code for controlling the player's different states and animations. At that time, you may have to do a little adjusting, but it shouldn't be a big deal.
Why is your code for the flipping so complicated? I used these lines and it works just fine. if(theRB.velocity.x > 0) { transform.localScale = Vector3.one; } if (theRB.velocity.x < 0) { transform.localScale = new Vector3(-1f, 1f, 0); }
We will build on it later, so having facingDirection stored will come in handy. Also, as movement scripts grow, separating concerns (like Flipping) into their own methods is considered best practice (that way we don't get monster scripts that are hard to read, where Update is packed with stuff). The other reason is that Vector3.one only works if people don't touch their scale. If they re-size their scale, Vector3.one suddenly introduces scaling issues.
@atilliator that one is super helpful if all you need is to flip the sprite. But if you are going to add children that also need to flip (like weapons, health bar, etc) rotate works nicely.
Yay another video ❤️❤️
This is very helpful
Thanks for making this series
You’re welcome! Glad to hear when people find the series helpful!
hi thank you i just finished your inventory system, do u know how use the block from inventory and place it on tile? like minecraft but 2d
I'm afraid that's a whole tutorial in itself. I know that Muddy Wolf has a video on Destructible Tiles and another on Spawning Tiles. I haven't tried them myself, but I know people who've found them useful. That might be a good place to start looking.
I cant get access to full version of TinySwords, only like a Demo one, got any clue where can i find all the graphics?
This is where I got it from: pixelfrog-assets.itch.io/tiny-swords/download/eyJpZCI6MTU5MTA3NywiZXhwaXJlcyI6MTcyODY3MTk4MX0%3d.iZd9E%2bburlTI7OBFGcq6dBGmCMQ%3d
That should get you the full version that I'm using.
I just used the pre made animations given in the asset pack and I am using a blend tree for idle and movement related animations. Is that okay? 🤔
That should be just fine. Later, we will add a simple state machine to our code for controlling the player's different states and animations. At that time, you may have to do a little adjusting, but it shouldn't be a big deal.
@@NightRunStudio Thanks a lot
Why is your code for the flipping so complicated? I used these lines and it works just fine.
if(theRB.velocity.x > 0)
{
transform.localScale = Vector3.one;
}
if (theRB.velocity.x < 0)
{
transform.localScale = new Vector3(-1f, 1f, 0);
}
We will build on it later, so having facingDirection stored will come in handy. Also, as movement scripts grow, separating concerns (like Flipping) into their own methods is considered best practice (that way we don't get monster scripts that are hard to read, where Update is packed with stuff).
The other reason is that Vector3.one only works if people don't touch their scale. If they re-size their scale, Vector3.one suddenly introduces scaling issues.
@@NightRunStudio spriteRenderer.flipX = true;
@atilliator that one is super helpful if all you need is to flip the sprite. But if you are going to add children that also need to flip (like weapons, health bar, etc) rotate works nicely.