void killActiveActors() { List <GameObject> activeActors = getActiveActors(); foreach (GameObject actorObj in activeActors) { ActorInterface actor = actorObj.GetComponent <ActorInterface>(); actor.removeHealth(actor.getHealth() + 1f); } }
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(); }