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


C# Weapon.ToString方法代码示例

本文整理汇总了C#中Weapon.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Weapon.ToString方法的具体用法?C# Weapon.ToString怎么用?C# Weapon.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Weapon的用法示例。


在下文中一共展示了Weapon.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EquipWeapon

 public void EquipWeapon(Weapon.WeaponType type)
 {
     Debug.Log ("Spawning " + type.ToString ());
     if (currentWeapon != null) {
         Destroy(currentWeapon.gameObject);
     }
     currentWeapon = Weapon.GetWeaponPrefab (type);
     currentWeapon.transform.SetParent (weaponAttachment);
     currentWeapon.transform.localPosition = new Vector3 (0, 0, 0);
     currentWeapon.transform.localRotation = new Quaternion (0, 0, 0, 0);
     currentWeapon.wielder = this;
 }
开发者ID:ineednoname,项目名称:BlocksV2,代码行数:12,代码来源:BlockManControl.cs

示例2: DisplayWinner

 private static void DisplayWinner(Weapon computerChoice, GameResult result)
 {
     Console.Write("I chose " + computerChoice.ToString() + ". ");
     switch (result)
     {
         case (GameResult.ComputerWins):
             Console.Write("I win!");
             break;
         case (GameResult.UserWins):
             Console.Write("You win!");
             break;
         case (GameResult.Tie):
             Console.Write("I guess we're both winners!");
             break;
     }
     Console.WriteLine();
 }
开发者ID:MrsJaw,项目名称:2016WSUHackathon,代码行数:17,代码来源:Program.cs

示例3: displayWeaponSynthesisDynamically_first

        //-------------------------------------------------------------------------------
        #endregion (-(Class)NodeInfo)

        //-------------------------------------------------------------------------------
        #region displayWeaponSynthesisDynamically_first 最上階部分結果データ表示
        //-------------------------------------------------------------------------------
        //
        private void displayWeaponSynthesisDynamically_first(Weapon weapon, SynthesisWeapons[] synthesisweapons)
        {
            treeViewResult.Nodes.Clear();

            TreeNode node = new TreeNode(weapon.ToString());
            displayWeaponSynthesisDynamically(node, synthesisweapons);
            treeViewResult.Nodes.Add(node);
            node.Expand();
        }
开发者ID:tomfuru,项目名称:PSO2AddAbility,代码行数:16,代码来源:FrmMain.cs

示例4: NotifyWeapon

 public void NotifyWeapon(Weapon weapon)
 {
     setTextAndRefresh(tblMainPanelLayout.Controls[_lblWeapon], weapon.ToString());
 }
开发者ID:Fux90,项目名称:GodsWill_ASCIIRPG,代码行数:4,代码来源:CharacterSheetUserControl.cs

示例5: updateWeaponGameObject

    private GameObject updateWeaponGameObject(GameObject obj, Weapon wep)
    {

        var equipTypePanel = UIHelper.getChildObject(obj, "EquipTypePanel");
        UIHelper.UpdateTextComponent(equipTypePanel, "EquipType", "Weapon");
        UIHelper.UpdateSpriteComponent(equipTypePanel, "EquipImage", assetLibrary.getSprite(wep.sheetname,wep.spriteindex));

        UIHelper.UpdateTextComponent(obj, "EquipStats", wep.ToString());
        return obj;
    }
开发者ID:mengtest,项目名称:UnityRPG,代码行数:10,代码来源:EquipmentControllerScript.cs


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