Example #1
0
void GameInstSet::step(GameState* gs) {
	for (int i = 0; i < deallocation_list.size(); i++) {
		deallocation_list[i]->free_reference();
	}
	deallocation_list.clear();
	for (int i = 0; i < unit_capacity; i++) {
		GameInst* inst = unit_set[i].inst;
		if (valid_inst(inst)) {
			inst->destroyed = false;
			inst->step(gs);
			update_instance_for_step(&unit_set[i], inst);
		}
	}
}