Exemplo n.º 1
0
    void killActiveActors()
    {
        List <GameObject> activeActors = getActiveActors();

        foreach (GameObject actorObj in activeActors)
        {
            ActorInterface actor = actorObj.GetComponent <ActorInterface>();
            actor.removeHealth(actor.getHealth() + 1f);
        }
    }
Exemplo n.º 2
0
    void playerEnemyCollision(Collider2D col)
    {
        ActorInterface enemy = col.transform.parent.GetComponent <ActorInterface>();

        enemy.removeHealth(bulletContainer.getBulletDamage());
        if (enemy.getHealth() <= 0)
        {
            parent.GetComponent <PlayerController>().killedEnemy(parentWeapon);
        }
        freeBullet();
    }