本文整理匯總了C#中BaseItem.FirstChar方法的典型用法代碼示例。如果您正苦於以下問題:C# BaseItem.FirstChar方法的具體用法?C# BaseItem.FirstChar怎麽用?C# BaseItem.FirstChar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BaseItem
的用法示例。
在下文中一共展示了BaseItem.FirstChar方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Init
public void Init(BaseItem item)
{
Clear();
switch (item.FirstChar())
{
case PlayerItem.FIRSTCHAR:
PlayerItemInfo PlayerItemInfo = DataBaseController.GetItem(DataBaseController.Instance.DataStructs.PrefabsStruct.PlayerItemInfo);
PlayerItemInfo.Init(item as PlayerItem, WithButtons);
CurItemInfo = PlayerItemInfo;
break;
case BonusItem.FIRSTCHAR:
BonusItemInfo BonusItemInfo = DataBaseController.GetItem(DataBaseController.Instance.DataStructs.PrefabsStruct.BonusItemInfo);
BonusItemInfo.Init(item as BonusItem, WithButtons);
CurItemInfo = BonusItemInfo;
break;
case ExecutableItem.FIRSTCHAR:
ExecutableItemInfo ExecutableItemInfo = DataBaseController.GetItem(DataBaseController.Instance.DataStructs.PrefabsStruct.ExecutableItemInfo);
ExecutableItemInfo.Init(item as ExecutableItem, WithButtons);
CurItemInfo = ExecutableItemInfo;
break;
case TalismanItem.FIRSTCHAR:
TalismanItemInfo TalismanItemInfo = DataBaseController.GetItem(DataBaseController.Instance.DataStructs.PrefabsStruct.TalismanItemInfo);
TalismanItemInfo.Init(item as TalismanItem, WithButtons);
CurItemInfo = TalismanItemInfo;
break;
case RecipeItem.FIRSTCHAR:
RecepiItemInfo RecepiItemInfo = DataBaseController.GetItem(DataBaseController.Instance.DataStructs.PrefabsStruct.RecepiItemInfo);
RecepiItemInfo.Init(item as RecipeItem, WithButtons);
CurItemInfo = RecepiItemInfo;
break;
}
Link();
// if (OnInitCallback != null)
// OnInitCallback(item,ItemOwner.Player);
}