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


C# Weapon.Pickup方法代码示例

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

示例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);
 }
开发者ID:Jay2645,项目名称:ludum-dare-7dRTS,代码行数:32,代码来源:Unit.cs

示例3: Equip

 public void Equip(Weapon newWeapon)
 {
     weapon = newWeapon;
     SetIdleAnimation(weapon.idleAnimation);
     weapon.Pickup(transform.parent.gameObject, whichHand);
 }
开发者ID:josephquested,项目名称:gangtown,代码行数:6,代码来源:Hand.cs


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