NDK: invalid use of incomplete type 'class UseDuration'というエラーに困っています...
C++初心者なので何をすればいいのかわかりません!どなたか助けてください!お願いします。
ちなみにエラーの箇所は下記の「if(itemstack.getMaxUseDuration() >= 20) {」と、
「if(itemstack.getMaxUseDuration() >= 10) {」、
「if(itemstack.getMaxUseDuration() >= 0) {」に引かさっています。
//DarkBowItem.cpp
#include "DarkBowItem.h"
std::string DarkBowItem::textures[2];
DarkBowItem::DarkBowItem(int itemId, std::string dark_bow_standby, int maxdamage) : BowItem(dark_bow_standby, itemId) {
setCategory(CreativeItemCategory::TOOLS);
setIcon("dark_bow_standby", 0);
setMaxStackSize(1);
setStackedByData(true);
setMaxDamage(maxdamage);
setHandEquipped();
textures[0] = "dark_bow_pulling_0";
textures[1] = "dark_bow_pulling_1";
textures[2] = "dark_bow_pulling_2";
}
bool DarkBowItem::use(ItemInstance& itemstack, Player& player) {
if(itemstack.getMaxUseDuration() >= 20) {
return setIcon(textures[0], 0);
}
if(itemstack.getMaxUseDuration() >= 10) {
return setIcon(textures[1], 1);
}
if(itemstack.getMaxUseDuration() >= 0) {
return setIcon(textures[2], 2);
}
return DarkBowItem::use(itemstack, player);
}

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。