Package plar.core

Examples of plar.core.ElementPlayer


    }

    class ActionMoronAI extends Action {
        public void run() {
            ElementPlayer p = (ElementPlayer) me;
            int r = (int) (Math.random() * 250);
            switch (r) {
            case 1:

                p.actions.forceAction("input", new KeyFlag(KeyFlag.LEFT));
View Full Code Here


    }

    public void elementCollided(Element e) {
        if(e.type==Common.ElementType.PLAYER) {

            ElementPlayer p = ((ElementPlayer)e);
            p.gl.get(p.currentGunIndex).addAmmo(ammoGap);
        }

    }
View Full Code Here

    public void elementCollided(Element e) {
        Common.info(1," This:"+this+ " Collided with"+e+"");
        if(e.type==Common.ElementType.PLAYER) {

            ElementPlayer p = ((ElementPlayer)e);
            ((ElementPlayer) e).lastTouch=null;
            p.energy-=damage;
        }

    }
View Full Code Here

        keysQueue = new ArrayList<KeyFlag>();
    }

    public void run() {

        ElementPlayer pme = (ElementPlayer)me;
        KeyFlag newKeys = popKeys();
        if(newKeys == null && currentKeys!=null && currentKeys.Key!=KeyFlag.NONE) newKeys=currentKeys;
        if(newKeys == null) return;
        pme.input(newKeys);
        currentKeys = newKeys;
    }
View Full Code Here

TOP

Related Classes of plar.core.ElementPlayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.