当前位置: 首页>>代码示例>>C#>>正文


C# Item.ToString方法代码示例

本文整理汇总了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 ();
			}
		}
	}
开发者ID:imlovee,项目名称:WatchRemember_Final,代码行数:15,代码来源:ControlAd.cs

示例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());
	}
开发者ID:OvertimeStudios,项目名称:CreepyBuster,代码行数:33,代码来源:GameController.cs

示例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;
        }
    }
开发者ID:trongthien18,项目名称:race-of-dragons,代码行数:33,代码来源:PlayerController.cs

示例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;
        }
开发者ID:j7b,项目名称:tgrid,代码行数:42,代码来源:CustomServerItemsProvider.cs

示例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));
     }
 }
开发者ID:KuroiAme,项目名称:Indexer,代码行数:8,代码来源:ContainerContent.cs

示例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;
    }
开发者ID:mengtest,项目名称:UnityRPG,代码行数:10,代码来源:EquipmentControllerScript.cs

示例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();
    }
开发者ID:JeffM2501,项目名称:CSC370,代码行数:12,代码来源:InventoryScreen.cs


注:本文中的Item.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。