本文整理汇总了C#中Item.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Item.ToString方法的具体用法?C# Item.ToString怎么用?C# Item.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnBillingResultOK
private void OnBillingResultOK (Item item, string id)
{
Debug.Log ("OnBillingResultOK: " + item.ToString ());
Log.log ("OnBillingResultOK: " + item.ToString ());
if (item == Item.NO_ADS) {
//PlayerPrefs.SetInt(PrefNameManager.PREF_INAPP_NOADS, 0);
//PlayerPrefs.Save();
if (m_useAd) {
SetAds ();
} else {
SetAds ();
}
}
}
示例2: OnItemCollected
private void OnItemCollected(Item.Type itemType, GameObject gameObject)
{
switch(itemType)
{
case Item.Type.PlasmaOrb:
orbsCollected += gameObject.GetComponent<PlasmaOrbItem>().orbs;
break;
case Item.Type.LevelUp:
levelUpCollected++;
break;
case Item.Type.SlowDown:
break;
case Item.Type.Invencibility:
invencibilityCollected++;
break;
case Item.Type.DeathRay:
deathRayCollected++;
break;
case Item.Type.Frozen:
frozenCollected++;
break;
}
UseItem(itemType);
Debug.Log("Collected " + itemType.ToString());
}
示例3: UserItem
internal void UserItem(Item currentItem)
{
if (isFinish)
return;
Debug.Log("Use: " + currentItem.ToString());
if (currentItem == Item.Shield)
{
GameObject shield = PhotonNetwork.Instantiate("BubbleShield", transform.position, Quaternion.identity, 0) as GameObject;
hasShield = true;
}
if (currentItem == Item.Energy)
{
if (skillController != null)
{
SoundManager.Instance.playSound(ESound.Energy);
float duration = PlayerData.Current.items[currentItem.ToString()].GetDuration();
skillController.ReduceTimeCoolDown(duration); // defaul is 5 sec
}
}
if (currentItem == Item.SpeedUp)
{
SoundManager.Instance.playSound(ESound.SpeedUp);
speedAngle *= 1.5f;
}
if (currentItem == Item.Rocket)
{
GameObject rocket = PhotonNetwork.Instantiate("Rocket", skillPlaceHolder.position, skillPlaceHolder.rotation, 0) as GameObject;
}
}
示例4: getMemberValue
private static string getMemberValue(Item target, string path)
{
if (path == null || path.Length == 0) {
return target.ToString();
}
List<string> pathNames = path.Split('.').ToList<string>();
Item item = target;
string value = String.Empty;
while (pathNames.Count > 0) {
switch (pathNames[0])
{
case "Number":
value = item.Number.ToString();
break;
case "PictureName":
value = item.PictureName.ToString();
break;
case "Brand":
value = item.Brand.ToString();
break;
case "Type":
value = item.Type.ToString();
break;
case "Year":
value = item.Year.ToString();
break;
case "EnginePower":
value = item.Year.ToString();
break;
case "Cabin":
value = item.Cabin.ToString();
break;
default:
value = item.Number.ToString();
break;
}
pathNames.RemoveAt(0);
}
return value;
}
示例5: RaiseContainerItemClicked
void RaiseContainerItemClicked(Item item)
{
var handler = this.ActivateDetail;
Console.WriteLine("item:"+item.ToString());
if (handler != null && item != null) {
handler(this, new ContainerContentClickedEventArgs(item));
}
}
示例6: updateItemGameobject
private GameObject updateItemGameobject(GameObject obj, Item i, int count)
{
var equipTypePanel = UIHelper.getChildObject(obj, "EquipTypePanel");
string itemName = string.Format("{0} ({1})",i.name,count);
UIHelper.UpdateTextComponent(equipTypePanel, "EquipType", itemName);
UIHelper.UpdateSpriteComponent(equipTypePanel, "EquipImage", assetLibrary.getSprite(i.sheetname, i.spriteindex));
UIHelper.UpdateTextComponent(obj, "EquipStats", i.ToString());
return obj;
}
示例7: SetElementImage
protected void SetElementImage(GUIElement element, Item item)
{
if (item == null || item.InventoryIcon == null)
element.BackgroundImage = null;
else
element.BackgroundImage = item.InventoryIcon;
element.Tag = item;
element.ToolTip = string.Empty;
if (item != null)
element.ToolTip = item.ToString();
}