private void checkEnemies() {
        /*
        GameActor a = getOwningActor();
        PhysicsComponent pc = (PhysicsComponent)a.getComponent("PhysicsComponent");
        WeaponsComponent wc = (WeaponsComponent)a.getComponent("WeaponsComponent");
        
        float cx = pc.getX();
        float cy = pc.getY();
        
        float attackAngle = wc.getAttackAngle();
        float range = wc.getRange();
        
        float angleToFirstEdge = -attackAngle - guardAngle;
        float angleToSecondEdge = attackAngle - guardAngle;
        float firstEdgeX = range * (float)Math.cos(angleToFirstEdge);
        float firstEdgeY = range * (float)Math.sin(angleToFirstEdge);
        float secondEdgeX = range * (float)Math.cos(angleToSecondEdge);
        float secondEdgeY = range * (float)Math.sin(angleToSecondEdge);
        
        for(GameActor enemy : Application.get().getLogic().getActors()) {
            StatusComponent enemySC = (StatusComponent)enemy.getComponent("StatusComponent");
            StatusComponent ownSC = (StatusComponent)getOwningActor().getComponent("StatusComponent");
            if(!enemySC.getAllegiance().equals(ownSC.getAllegiance()) && !enemySC.getType().equalsIgnoreCase("Projectile")) { // only shoot enemies. :)
                PhysicsComponent enemyPC = (PhysicsComponent)enemy.getComponent("PhysicsComponent");
                float relativeX = Math.abs(enemyPC.getX() - cx);
                float relativeY = Math.abs(enemyPC.getY() - cy);

                if(withinRadius(relativeX, relativeY, range) && isClockwise(firstEdgeX, firstEdgeY, relativeX, relativeY) && !isClockwise(secondEdgeX, secondEdgeY, relativeX, relativeY)) {
                    setTarget(enemy.getID());
                    return;
                }
            }
        }
        * 
        */
        
        GameActor a = getOwningActor();
        PhysicsComponent pc = (PhysicsComponent)a.getComponent("PhysicsComponent");
        WeaponsComponent wc = (WeaponsComponent)a.getComponent("WeaponsComponent");
        
        float cx = pc.getX();
        float cy = pc.getY();
        float range = wc.getRange();
        
        for(GameActor enemy : Application.get().getLogic().getActors()) {
            StatusComponent enemySC = (StatusComponent)enemy.getComponent("StatusComponent");
            StatusComponent ownSC = (StatusComponent)getOwningActor().getComponent("StatusComponent");
            if(!enemySC.getAllegiance().equals(ownSC.getAllegiance()) && !enemySC.getType().equalsIgnoreCase("Projectile")) { // only shoot enemies. :)
                PhysicsComponent enemyPC = (PhysicsComponent)enemy.getComponent("PhysicsComponent");
                float relativeX = Math.abs(enemyPC.getX() - cx);
                float relativeY = Math.abs(enemyPC.getY() - cy);

                if(withinRadius(relativeX, relativeY, range)) {
                    setTarget(enemy.getID());
                    return;
                }
            }
        }
        
        // no target within radius
        setTarget(-1);
    }