本文整理汇总了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();
}
示例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();
}
示例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);
}
}