Пример #1
0
void clearGameTarget(GameTarget* target) {
	target->name = "?";
	target->gain = 0;
	target->status = TARGET_HANDLED;
	
	if (&(target->actionList) != NULL) {
		clearTargetActionList(&(target->actionList));
	}
}
Пример #2
0
void initTargetActions2012() {
    clearTargetActionList(&(bullion1Target.actionList));
    clearTargetActionList(&(bottle1Target.actionList));
    clearTargetActionList(&(bottle2Target.actionList));
    clearTargetActionList(&(cd4Target.actionList));
    clearTargetActionList(&(bullionRight1Target.actionList));
    clearTargetActionList(&(bullionLeft1Target.actionList));
    //clearTargetActionList(&(opponentCDTarget.actionList));

    addTargetAction(&(bullion1Target.actionList), &bullion1TargetAction, bullion1Location, bullion1Location, 2, NULL, NULL);
    addTargetAction(&(bottle1Target.actionList), &bottle1TargetAction, bottle1Location, bottle1Location, 2, NULL, NULL);
    addTargetAction(&(bottle2Target.actionList), &bottle2TargetAction, bottle2Location, bottle2Location, 3, NULL, NULL);
    addTargetAction(&(cd4Target.actionList), &cdTakeTargetAction, bottle2Location, dropZone1Location, 4, NULL /** TODO*/,&cdTakeTargetActionItemList);

    // BULLION RIGHT 1
    addTargetAction(&(bullionRight1Target.actionList), &bullionRight1FromDropZone1TargetAction, dropZone1Location, dropZone1Location, 5, NULL /** TODO*/, &bullionRight1FromDropZone1ActionItemList);
    addTargetAction(&(bullionRight1Target.actionList), &bullionRight1FromR3TargetAction, obstacleR3Location, dropZone1Location, 7, NULL /** TODO*/, &bullionRight1FromR3ActionItemList);

    // BULLION LEFT 1
    addTargetAction(&(bullionLeft1Target.actionList), &bullionLeft1FromDropZone1TargetAction, dropZone1Location, dropZone1Location, 5, NULL /** TODO*/, &bullionLeft1FromDropZone1ActionItemList);
    addTargetAction(&(bullionLeft1Target.actionList), &bullionLeft1FromL3TargetAction, obstacleL3Location, dropZone1Location, 7, NULL /** TODO*/, &bullionLeft1FromL3ActionItemList);

    // OPPONENT CD
    //addTargetAction(&(opponentCDTarget.actionList), &opponentCDTargetAction, &dropZone1Location, &dropZone1Location, 5, NULL);
}