本文整理汇总了C++中Soil::setSoilType方法的典型用法代码示例。如果您正苦于以下问题:C++ Soil::setSoilType方法的具体用法?C++ Soil::setSoilType怎么用?C++ Soil::setSoilType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Soil
的用法示例。
在下文中一共展示了Soil::setSoilType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
void* Creator::create(const string& value, int cidx, int ridx) const
{
if (!has(value)) return NULL;
// Shell retorna tudo com lowercase
if (isEqual(value,"soilsoft"))
{
Soil* b = new Soil(cidx,ridx);
b->setSoilType(stSoft);
return b;
}
else if (isEqual(value,"soilhard"))
{
Soil* b = new Soil(cidx,ridx);
b->setSoilType(stHard);
return b;
}
else if (isEqual(value,"rock"))
{
return new Rock(cidx,ridx);
}
else if (isEqual(value,"aluminum"))
{
return new Aluminum(cidx,ridx);
}
else if (isEqual(value,"coal"))
{
return new Coal(cidx,ridx);
}
else if (isEqual(value,"diamond"))
{
return new Diamond(cidx,ridx);
}
else if (isEqual(value,"gold"))
{
return new Gold(cidx,ridx);
}
else if (isEqual(value,"iron"))
{
return new Iron(cidx,ridx);
}
// Ferramentas
// Picaretas
else if (isEqual(value,"pickernormal"))
{
return new Picker(PICKERNORMAL);
}
else if (isEqual(value,"pickerpro"))
{
return new Picker(PICKERPRO);
}
else if (isEqual(value,"pickermaster"))
{
return new Picker(PICKERMASTER);
}
// Mochilas
else if (isEqual(value,"bagnormal"))
{
return new Bag(BAGNORMAL);
}
else if (isEqual(value,"bagpro"))
{
return new Bag(BAGPRO);
}
else if (isEqual(value,"bagmaster"))
{
return new Bag(BAGMASTER);
}
// Iluminacao
else if (isEqual(value,"lighter"))
{
return new Light(LIGHTNORMAL);
}
else if (isEqual(value,"flashlight"))
{
return new Light(LIGHTPRO);
}
else if (isEqual(value,"spotlight"))
{
return new Light(LIGHTMASTER);
}
// Outros
else if (isEqual(value,"ladder"))
{
return new Ladder(cidx,ridx);
}
else if (isEqual(value,"beam"))
{
return new Beam(cidx,ridx);
}
else if (isEqual(value,"food"))
{
return new Food(cidx,ridx);
}
else if (isEqual(value,"extralife"))
{
return new Extralife(cidx,ridx);
}
else if (isEqual(value,"dinamite"))
{
return new Dinamite(cidx,ridx);
//.........这里部分代码省略.........