本文整理汇总了C#中Weapon.Pickup方法的典型用法代码示例。如果您正苦于以下问题:C# Weapon.Pickup方法的具体用法?C# Weapon.Pickup怎么用?C# Weapon.Pickup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Weapon
的用法示例。
在下文中一共展示了Weapon.Pickup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PickupWeapon
public void PickupWeapon(Weapon weapon)
{
if (_weapon != null) return; // currently refuse if has weapon, later though we could make him drop current if already has one
weapon.Pickup(this, _weaponOffset);
//weapon.DebugPrint();
weapon.SetDirection(new Vector2(_facingDirection, 0));
}
示例2: CloneUnit
public void CloneUnit(Unit oldClone)
{
isSelectable = oldClone.isSelectable;
isSelected = oldClone.isSelected;
id = oldClone.id;
enemyName = oldClone.enemyName;
leader = oldClone.leader;
uName = oldClone.uName;
teamColor = oldClone.teamColor;
label = oldClone.label;
status = oldClone.status;
movementType = oldClone.movementType;
kills = oldClone.kills;
lastDamager = oldClone.lastDamager;
health = oldClone.health;
weapon = oldClone.weapon;
_initialWeapon = oldClone._initialWeapon;
aBase = oldClone.aBase;
raycastIgnoreLayers = Commander.player.raycastIgnoreLayers;
weapon.Pickup(this);
leader.ReplaceUnit(id, this);
if (isSelected)
SetOutlineColor(selectedColor);
else
SetOutlineColor(outlineColor);
orderData = oldClone.orderData;
if (orderData != null)
orderData.SetUnit(this);
skipSpawn = true;
SetTeamColor();
Invoke("AllowSpawn", 5.0f);
}
示例3: Equip
public void Equip(Weapon newWeapon)
{
weapon = newWeapon;
SetIdleAnimation(weapon.idleAnimation);
weapon.Pickup(transform.parent.gameObject, whichHand);
}