72 - Placeholder art
Alright first time working in a few days, feels good! I didn't get as much done as I wanted because I'm not feeling very good today, but hey, progress is progress. So Mostly what I did today was get some art in place. This art is just temporary, just to help show what things should be instead of squares. I got the little pirate animation from here. For the button and burlap sheet, I just googled something and pulled it off that. So for this I just set up a simple state machine in the animator thing on Unity. I had a bit of trouble fumbling around with it, but in the end I figured it out for the most part. Basically there are 5 main states, one for each direction and transition/standing still state. I control the states with 4 booleans. private void CrewAnimation(string Direction) { Animator.SetBool("Up", false); Animator.SetBool("Left", false); Animator.SetBool("Down", false); Animator.SetBool("Right", false); Animator.SetBool("Still", false); if (Direction != "Stop") { Animator.SetBool(Direction, true); } } So you can kinda see what I'm doing here. Honestly I'm being a bit lazy, instead of figuring out what Direction I'm passing, I just turn them all off and turn the one I need on. If I pass stop they will all be off and I have an animation that doesn't move. I'm not sure if I did that last part wrong, just having an animation state that is just a single frame. Who knows, maybe I'll learn about it later. void Update() { if (!Ship.Paused) { //DoStuff... Animator.StopPlayback(); } else Animator.StartPlayback(); } This is pretty simple, I just use it so when you pause the game, the animations stop, and start up again when you hit play. I couldn't tell if when you start it back if the animation starts at the beginning or not. So it might be, if you hit space a bunch really fast, they will sort of glide across the screen. I guess that's something I might have to fix later. But it looks pretty decent right now, for just being 4 frames of animation. I also did a bit of stuff for the crew on crew combat. Mostly I made a base class for the ship dudes and the combat dudes, so I could not have as much repeat of code. Also so I could use both classes in the Display class for the UI. Did a few other things, but they are not too important right now. The plan for tomorrow is to get pathfinding working and get dudes to attack their targets. The pathfinding for this will be a little harder because I don't want people to overlap each other. So I guess I need to do a little research for the next stream. Guess that's it, let me know what you think about this placeholder art. Is it good enough to kinda tell what is going on?
2/9/2017 4:42:06 PM





Add Comment Auther

Comment