I've added an unit class structure similiar to the structure classes. It is now possible to add units to the field, select them for their information and give them a move order.
Moving keeps track of the facing of the unit and rotatets it as necessary. Well, actually the sprite is not rotated, but there are 32 different images of the same unit facing different directions. As the units move, thay push back the fog-of-war.
I'm going to make the units find paths using A* pathfinding, but for now the unit just goes x++, y++ until it reaches it's target. I recorded a video clip of the unit movement in action, but YouTube seems to be working slowly right now, so I'll just post the video once it get's processed.
No comments:
Post a Comment