コード例 #1
0
ファイル: NetScript.cs プロジェクト: SeanDarsie/TowerDefense
    void OnTriggerEnter(Collider other)
    {
        INettable x = other.GetComponent <INettable>();

        if (x != null)
        {
            x.BeNetted(1.0f);
            other.GetComponent <Creep>().TakeDamage(netDamage, Tower.DamageType.PHYSICAL);
            Destroy(gameObject);
        }
    }
コード例 #2
0
ファイル: FrostTower.cs プロジェクト: SeanDarsie/TowerDefense
 void FlashFreeze()
 {
     foreach (GameObject x in countEnemiesInCollider.creepsInsideCollider)
     {
         INettable net = x.GetComponent <INettable>();
         if (net != null)
         {
             net.BeNetted(howLongToFreezeEnemies);
         }
     }
     abilityCountdown = Time.time + abilityCooldown;
     DeactivateAbilityIndicator();
     // freeze some enemies. doesn't hit air units Air units will have their own path.
 }