本文整理汇总了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;
}
示例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();
}
示例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();
}
示例4: NotifyWeapon
public void NotifyWeapon(Weapon weapon)
{
setTextAndRefresh(tblMainPanelLayout.Controls[_lblWeapon], weapon.ToString());
}
示例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;
}