Beispiel #1
0
void Spawn(Unit *U, PathList *PL)
{
    Path *tempPath;
    tempPath = PathPeek(UnitPosition(U),PL);
    
    attron(COLOR_PAIR(UnitID(U)-96));
    if (UnitSpeed(U))
    {

        mvprintw(STARTY+PathY(tempPath),STARTX+PathX(tempPath)*MAPSCALE+2,"%d",UnitHealth(U));
    }
    else
    {
        mvprintw(STARTY+PathY(tempPath),STARTX+PathX(tempPath)*MAPSCALE,"%d",UnitHealth(U));
    }
    attroff(COLOR_PAIR(UnitID(U)-96));
}
Beispiel #2
0
Unit::Unit(void)
{
	gMoveState		= Stand;
	gWeaponState	= Hold;

	gHealth	=	UnitHealth(10.0f, 10.0f);

	gCurrentWeapon	=	NULL;
	gPrimaryWeapon	=	NULL;
	gSecondaryWeapon=	NULL;

	gWalkSpeed = 1.0f;
	gRunSpeed  = 1.0f;

	gMultipliers[0]	=	1.0f;
	gMultipliers[1]	=	1.0f;
	gMultipliers[2]	=	1.0f;

	gDeathSound	=	"";
}