本文整理汇总了C++中setInfoBoxMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ setInfoBoxMessage函数的具体用法?C++ setInfoBoxMessage怎么用?C++ setInfoBoxMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setInfoBoxMessage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: activate
static void activate(int val)
{
if (strlen(self->requires) != 0)
{
if (removeInventoryItemByObjectiveName(self->requires) == TRUE)
{
self->requires[0] = '\0';
setEntityAnimation(self, "WALK");
}
else
{
setInfoBoxMessage(90, 255, 255, 255, _("%s is required"), _(self->requires));
return;
}
}
generateInputCode();
self->mental = 0;
self->thinkTime = 120;
setInfoBoxMessage(300, 255, 255, 255, _("Repeat the sequence"));
self->action = &displayInputCode;
self->touch = NULL;
self->activate = NULL;
setPlayerLocked(TRUE);
}
开发者ID:LibreGames,项目名称:edgar,代码行数:35,代码来源:code_door.c
示例2: addRequiredToInventory
void addRequiredToInventory(Entity *other)
{
Entity *item;
if (!(self->flags & INVULNERABLE) && other->type == PLAYER)
{
item = getInventoryItemByObjectiveName(self->requires);
if (item != NULL)
{
item->health++;
self->inUse = FALSE;
setInfoBoxMessage(60, 255, 255, 255, _("Picked up %s"), _(self->objectiveName));
fireTrigger(self->objectiveName);
fireGlobalTrigger(self->objectiveName);
}
else
{
setInfoBoxMessage(60, 255, 255, 255, _("%s is required to carry this item"), _(self->requires));
}
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:27,代码来源:inventory.c
示例3: activate
static void activate(int val)
{
Entity *e = getInventoryItemByObjectiveName(self->requires);
if (e == NULL)
{
setInfoBoxMessage(60, 255, 255, 255, _("%s is required"), _(self->requires));
}
else
{
self->mental = 0;
setInfoBoxMessage(300, 255, 255, 255, _("Enter the directions"));
self->target->requires[0] = '\0';
self->action = &readInputCode;
self->touch = NULL;
self->activate = NULL;
setPlayerLocked(TRUE);
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:26,代码来源:instruction_machine.c
示例4: activate
static void activate(int val)
{
if (self->active == FALSE)
{
if (removeInventoryItemByObjectiveName(self->requires) == TRUE)
{
self->active = TRUE;
self->thinkTime = 60;
fireTrigger(self->objectiveName);
fireGlobalTrigger(self->objectiveName);
setEntityAnimation(self, "WALK");
self->action = &sink;
setInfoBoxMessage(60, 255, 255, 255, _("Used %s"), _(self->requires));
}
else
{
setInfoBoxMessage(60, 255, 255, 255, _("%s is required"), _(self->requires));
}
}
}
开发者ID:polluks,项目名称:edgar,代码行数:27,代码来源:gazer_eye_slot.c
示例5: touch
static void touch(Entity *other)
{
pushEntity(other);
if (self->type == MANUAL_DOOR)
{
if (other->type == PLAYER && self->active == FALSE)
{
/* Look through the player's inventory */
if (removeInventoryItemByObjectiveName(self->requires) == TRUE)
{
setInfoBoxMessage(60, 255, 255, 255, _("Used %s"), _(self->requires));
self->action = &moveToTarget;
self->active = TRUE;
}
else
{
setInfoBoxMessage(60, 255, 255, 255, _("%s is needed to open this door"), _(self->requires));
}
}
}
else if (other->type == PLAYER && self->active == FALSE && self->mental == 0)
{
setInfoBoxMessage(60, 255, 255, 255, _("This door is locked"));
}
}
开发者ID:revcozmo,项目名称:edgar,代码行数:31,代码来源:door.c
示例6: takeDamage
static void takeDamage(Entity *other, int damage)
{
Entity *temp;
if (!(self->flags & INVULNERABLE))
{
if (strcmpignorecase(other->name, "weapon/wood_axe") == 0)
{
playSoundToMap("sound/item/chop", -1, self->x, self->y, 0);
self->health -= damage;
if (self->health > 0)
{
setCustomAction(self, &flashWhite, 6, 0, 0);
}
else
{
if (self->mental > 0)
{
self->health = self->maxHealth;
self->mental--;
}
else
{
setInfoBoxMessage(60, 255, 255, 255, _("It's out of apples..."));
}
}
}
else
{
playSoundToMap("sound/common/dink", -1, self->x, self->y, 0);
if (other->reactToBlock != NULL)
{
temp = self;
self = other;
self->reactToBlock(temp);
self = temp;
}
damage = 0;
if (other->type != PROJECTILE && prand() % 10 == 0)
{
setInfoBoxMessage(60, 255, 255, 255, _("This weapon is not having any effect..."));
}
}
setCustomAction(self, &invulnerableNoFlash, HIT_INVULNERABLE_TIME, 0, 0);
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:59,代码来源:apple_tree.c
示例7: touch
static void touch(Entity *other)
{
if (self->active == TRUE)
{
if (self->target != NULL)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to retrieve %s"), self->target->objectiveName);
}
else
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to interact"));
}
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:15,代码来源:pedestal.c
示例8: touch
static void touch(Entity *other)
{
Entity *temp;
if (other->type == PLAYER && self->health > 0)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to retrieve the Purple Gem"));
}
else if (other->type == WEAPON && (other->flags & ATTACKING))
{
if (self->takeDamage != NULL && !(self->flags & INVULNERABLE))
{
self->takeDamage(other, other->damage);
}
}
else if (other->type == PROJECTILE && other->parent != self)
{
if (self->takeDamage != NULL && !(self->flags & INVULNERABLE))
{
self->takeDamage(other, other->damage);
}
temp = self;
self = other;
self->die();
self = temp;
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:33,代码来源:containment_unit_controls.c
示例9: touch
static void touch(Entity *other)
{
if (self->damage == 1 && self->mental == 0 && self->thinkTime == 0)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to reprogram the Soul Merger"));
}
}
开发者ID:revcozmo,项目名称:edgar,代码行数:7,代码来源:soul_merger_control_panel.c
示例10: bucketTouch
static void bucketTouch(Entity *other)
{
if (other->type == PLAYER)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to interact"));
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:7,代码来源:catapult.c
示例11: touch
static void touch(Entity *other)
{
if (other->type == PLAYER && game.showHints == TRUE)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to talk to %s"), _(self->objectiveName));
}
}
开发者ID:polluks,项目名称:edgar,代码行数:7,代码来源:npc.c
示例12: takeDamage
static void takeDamage(Entity *other, int damage)
{
Entity *temp;
setCustomAction(self, &invulnerableNoFlash, HIT_INVULNERABLE_TIME, 0, 0);
playSoundToMap("sound/common/dink", -1, self->x, self->y, 0);
if (other->reactToBlock != NULL)
{
temp = self;
self = other;
self->reactToBlock(temp);
self = temp;
}
if (other->type != PROJECTILE && prand() % 10 == 0)
{
setInfoBoxMessage(60, 255, 255, 255, _("This weapon is not having any effect..."));
}
damage = 0;
}
开发者ID:LibreGames,项目名称:edgar,代码行数:26,代码来源:glass_wall.c
示例13: lookForPlayer
static void lookForPlayer()
{
int frame;
float timer;
if (self->active == TRUE)
{
self->flags &= ~NO_DRAW;
moveLeftToRight();
if (self->currentFrame == 3)
{
if (self->health == 0)
{
playSoundToMap("sound/enemy/gazer/flap", -1, self->x, self->y, 0);
self->health = 1;
}
}
else
{
self->health = 0;
}
if (player.health > 0 && player.alpha == 255 && collision(self->x + self->w / 2 - 10, self->y, 20, self->endY, player.x, player.y, player.w, player.h) == 1)
{
playSoundToMap("sound/enemy/gazer/growl", -1, self->x, self->y, 0);
setInfoBoxMessage(120, 255, 255, 255, _("INTRUDER!"));
self->thinkTime = 300;
activateEntitiesWithRequiredName(self->objectiveName, FALSE);
if (self->mental == 1)
{
summonEnemies();
}
frame = self->currentFrame;
timer = self->frameTimer;
setEntityAnimation(self, "ATTACK_1");
self->currentFrame = frame;
self->frameTimer = timer;
self->target = &player;
self->action = &followPlayer;
}
}
else
{
self->flags |= NO_DRAW;
}
}
开发者ID:LibreGames,项目名称:edgar,代码行数:60,代码来源:scanner.c
示例14: scriptAddToInventory
void scriptAddToInventory(char *name, int quiet)
{
int i;
Entity *e;
e = addPermanentItem(name, 0, 0);
for (i=0;i<MAX_INVENTORY_ITEMS;i++)
{
if (inventory.item[i].inUse == FALSE)
{
inventory.item[i] = *e;
inventory.item[i].face = RIGHT;
inventory.item[i].thinkTime = 0;
setEntityAnimationByID(&inventory.item[i], 0);
if (quiet == FALSE)
{
setInfoBoxMessage(60, 255, 255, 255, _("Picked up %s"), _(inventory.item[i].objectiveName));
}
break;
}
}
e->inUse = FALSE;
}
开发者ID:LibreGames,项目名称:edgar,代码行数:30,代码来源:inventory.c
示例15: activate
static void activate(int val)
{
if (self->active == TRUE)
{
if (self->health == 0)
{
runScript("puzzle_pieces");
}
if (self->health == 1)
{
if (self->target->mental == 0)
{
self->target->mental = -2;
}
self->mental = 0;
setInfoBoxMessage(300, 255, 255, 255, _("Solve the jigsaw puzzle"));
self->target->requires[0] = '\0';
self->action = &readInputCode;
self->touch = NULL;
self->activate = NULL;
setPlayerLocked(TRUE);
}
}
}
开发者ID:revcozmo,项目名称:edgar,代码行数:32,代码来源:jigsaw_puzzle.c
示例16: touch
static void touch(Entity *other)
{
if (other->type == PLAYER && self->active == FALSE)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to interact"));
}
}
开发者ID:polluks,项目名称:edgar,代码行数:7,代码来源:gazer_eye_slot.c
示例17: activateEntitiesValueWithObjectiveName
void activateEntitiesValueWithObjectiveName(char *name, int value)
{
EntityList *el;
Entity *temp;
for (el=entities->next;el!=NULL;el=el->next)
{
if (el->entity->inUse == TRUE && el->entity->activate != NULL && strcmpignorecase(el->entity->objectiveName, name) == 0)
{
temp = self;
self = el->entity;
if (self->type == MANUAL_LIFT && self->active == FALSE)
{
setInfoBoxMessage(90, 255, 255, 255, _("This lift is not active"));
}
else
{
self->activate(value - self->health);
}
self = temp;
}
}
}
开发者ID:revcozmo,项目名称:edgar,代码行数:27,代码来源:entity.c
示例18: checkSolution
static int checkSolution()
{
int i, total;
char solution[6], c[2];
Entity *e;
e = self->target;
while (e != NULL)
{
if (e->y == self->endY && e->x == self->x)
{
break;
}
e = e->target;
}
if (e == NULL)
{
showErrorAndExit("Could not find starting peg for row");
}
for (i=0;i<4;i++)
{
if (e->health == 0)
{
setInfoBoxMessage(180, 255, 255, 255, _("Select a colour for every peg in the row"));
return -1;
}
snprintf(c, 2, "%d", e->health);
solution[i] = c[0];
e = e->target;
}
solution[i] = '\0';
total = 0;
for (i=0;i<4;i++)
{
if (solution[i] == self->requires[i])
{
total++;
}
}
e->health = total + 1;
setEntityAnimationByID(e, e->health);
return strcmpignorecase(solution, self->requires) == 0 ? TRUE : FALSE;
}
开发者ID:LibreGames,项目名称:edgar,代码行数:57,代码来源:mastermind_display.c
示例19: touch
static void touch(Entity *other)
{
float dirX, dirY;
if (self->active == FALSE && other->type == PLAYER)
{
setInfoBoxMessage(0, 255, 255, 255, _("Press Action to interact"));
}
else if (self->health == 1 && fabs(self->x - other->x) <= fabs(self->dirX) && fabs(self->y - other->y) <= fabs(self->dirY))
{
if (strcmpignorecase(other->name, "item/robot_direction") == 0)
{
dirY = dirX = 0;
switch (other->health)
{
case 0:
dirY = -self->speed;
setEntityAnimation(self, "JUMP");
break;
case 1:
dirY = self->speed;
setEntityAnimation(self, "JUMP");
break;
case 2:
dirX = -self->speed;
setEntityAnimation(self, "WALK");
self->face = LEFT;
break;
default:
dirX = self->speed;
setEntityAnimation(self, "WALK");
self->face = RIGHT;
break;
}
if (dirY != self->dirY || dirX != self->dirX)
{
self->x = other->x;
self->y = other->y;
}
self->dirY = dirY;
self->dirX = dirX;
}
}
}
开发者ID:revcozmo,项目名称:edgar,代码行数:57,代码来源:robot.c
示例20: saveGameInSlot
static void saveGameInSlot()
{
saveGame(menu.index - 1);
freeMessageQueue();
setInfoBoxMessage(60, 255, 255, 255, _("Game Saved"));
pauseGame();
}
开发者ID:polluks,项目名称:edgar,代码行数:10,代码来源:io_menu.c
注:本文中的setInfoBoxMessage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论