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


C# Bullet.Disable方法代码示例

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


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

示例1: ApplyDamage

 IEnumerator ApplyDamage(float p_time, float p_damage, Bullet p_bullet)
 {
     yield return new WaitForSeconds(p_time);
     if (p_bullet != null)
         p_bullet.Disable();
     hp -= p_damage;
     _renderer.material.color += new Color(0.5f, 0f, 0f);
     if (hp <= 0)
         TowerDeath();
 }
开发者ID:pcpellegrini,项目名称:Aria,代码行数:10,代码来源:Tower.cs

示例2: ApplyDamage

 IEnumerator ApplyDamage(string p_point, float p_damage, float p_time, Bullet p_bullet, Vector3 p_pos)
 {
     yield return new WaitForSeconds(p_time);
     if (p_bullet != null)
         p_bullet.Disable();
     energy -= p_damage * 1f;
     if (energy <= 0f)
     {
         _anim.SetTrigger(_animDeath);
         _rigidbody.useGravity = true;
         _isDead = true;
         this.enabled = false;
     }
     if (_bloodParticleFree.Count > 0)
     {
         _bloodParticleUsed.Add(_bloodParticleFree[0]);
         _bloodParticleFree.RemoveAt(0);
         int __idx = _bloodParticleUsed.Count - 1;
         _bloodParticleUsed[__idx].transform.position = p_pos;
         _bloodParticleUsed[__idx].Play();
         StartCoroutine(DisableBlood(_bloodParticleUsed[__idx].duration, _bloodParticleUsed[__idx]));
     }
     _damageCount += p_damage;
     if (_damageCount > (energy*0.05f) && !_inRasanteAttack && !_inSpitAttack && !_grabing)
     {
         _damageCount = 0;
         GoHide();
     }
     base.LifeChange();
 }
开发者ID:pcpellegrini,项目名称:Aria,代码行数:30,代码来源:Monster_Aerial.cs

示例3: ApplyDamage

 IEnumerator ApplyDamage(string p_point, float p_damage, float p_time, Bullet p_bullet)
 {
     yield return new WaitForSeconds(p_time);
     if (p_bullet != null)
     p_bullet.Disable();
     energy -= p_damage * 1f;
     if (energy <= 0)
     {
         Invoke("Disable", explosionBlood.duration);
         explosionBlood.Play();
         body.SetActive(false);
     }
 }
开发者ID:pcpellegrini,项目名称:Aria,代码行数:13,代码来源:Monster_Little.cs


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