Ejemplo n.º 1
0
    public override void Attack(BaseGameEntity target)
    {
        Projectile_Flame projectile = EntityManager.S.GetEntity(projectileType) as Projectile_Flame;

        projectile.transform.position = transform.position;
        projectile.transform.rotation = transform.rotation;                   // becuase the tower is already looking at the enemy
        projectile.scaleWidth         = flamePartical.transform.localScale.x; // scale as the flame particle does

        projectile.FireProjectile(target.transform, cur_damage, cur_attkRange);
        SetAnimation_Attack();
    }
Ejemplo n.º 2
0
    // TODO: this is a hack.  the Weapon should store whether it does pushback
    bool DoesWeaponApplyPushbackForce(GameObject weapon)
    {
        Weapon_Melee_Boomerang b = weapon.GetComponent <Weapon_Melee_Boomerang>();

        if (b != null)
        {
            return(false);
        }

        Projectile_Flame f = weapon.GetComponent <Projectile_Flame>();

        if (f != null)
        {
            return(false);
        }

        return(true);
    }