コード例 #1
0
ファイル: AILegacy.cs プロジェクト: nasa03/ness
	/// <summary>
	/// Ends the attack, turning off the trails and caster and beginning the cooldown timer.
	/// </summary>
	void EndAttack ()
	{
		attackCooldown.StartTimer (cooldownTime);
		if (!enemy.currentAttack.IsRanged ()) {
			attackCaster.End ();
			trailRenderer.enabled = false;
		}
		isAttacking = false;
		// TODO This is bad practice. When we refactor this, let's properly enapsulate
		// the current attack in one of these classes.
		enemy.currentAttack = null;
	}
コード例 #2
0
ファイル: Fighter.cs プロジェクト: nasa03/gladiators
 void SetAttackActive(bool isActive)
 {
     if (attackCaster != null)
     {
         if (isActive)
         {
             attackCaster.Begin(currentAttack);
         }
         else
         {
             attackCaster.End();
         }
     }
 }
コード例 #3
0
 virtual public void EndAttack()
 {
     attackCast.OnHit -= OnWeaponHit;
     attackCast.End();
 }
コード例 #4
0
 /// <summary>
 /// End the sweep for damageable objects on the current attack
 /// </summary>
 void EndAttackCast()
 {
     attackCaster.End();
 }
コード例 #5
0
 void DestroyProjectile()
 {
     attackCast.OnHit -= OnProjectileHit;
     attackCast.End();
     Destroy(gameObject);
 }